Hi,
I'm using Flexcel 6.1.1 and Delphi XE5.
I'm not able to protect cells when I create my worksheet.
I used the ApiMate and applied the code, but the user still can modified the protected cell values.
each column has the following code :
fmt := xls.GetCellVisibleFormatDef(6, 16);
fmt.Font.Color := TExcelColor.FromTheme(TThemeColor.Background1);
fmt.FillPattern.Pattern := TFlxPatternStyle.Solid;
fmt.FillPattern.FgColor := TExcelColor.FromTheme(TThemeColor.Foreground2, -0.249977111117893);
fmt.FillPattern.BgColor := TExcelColor.Automatic;
fmt.Locked := false; <--
xls.SetCellFormat(6, 16, xls.AddFormat(fmt));
SheetProtectionOptions := TSheetProtectionOptions.Create(false);
SheetProtectionOptions.Contents := true;
SheetProtectionOptions.Objects := true;
SheetProtectionOptions.Scenarios := true;
SheetProtectionOptions.SelectUnlockedCells := true;
xls.Protection.SetSheetProtection('1234', SheetProtectionOptions);
But the user can change those values. What am I missing?
TIA,
Clément