SVN change log
Workbook, worksheet and cell protection (read/write in BIFF2/BIFF5/BIFF8/OOXML/ODS, write in ExcelXML).
I used FPSpreadSheet 1.8.2 - I was using worksheet protection without password and it worked.This can't be -- I checked the released source files of v1.8.0, 1.8.2, and 1.8.3, and none of the contains the protection routines. You probably somehow must have got the trunk files.
So should I downgrade and wait for next version to implement worksheet protection with password?Or load the trunk version from CCR again - trunk is the version which is actively developed, it is always the most recent version. You should use SVN to download it.
The "SVN change log" refers to the current development version, i.e. trunk.QuoteSVN change log
Workbook, worksheet and cell protection (read/write in BIFF2/BIFF5/BIFF8/OOXML/ODS, write in ExcelXML).
My project didn't compile. Got an error:Don't add fpspreadsheet directories to the search path of the project. This is the Delphi way leading into chaos. Use the Lazarus package system: You must add the package "laz_fpspreadsheet" to the requirements of the project ("Project" > "Project inspector" > "Add" > "Add new requirement", find "laz_fpspreadsheet", select it and click OK). Then your project should be able to find all fpspreadsheet files required.
fpstypes.pas(13,2) Fatal: Cannot open include file "fps.inc"
Strange. I checked again. It was 1.8.2 from Sourceforge (File with change date of 15.06.2017) - not the trunc.The official 1.8.2 zip download file from CCR (https://sourceforge.net/projects/lazarus-ccr/files/FPSpreadsheet/) has date 2017-04-11. Does your file belong to the CodeTyphon distribution? This could explain it.
My project didn't compile. Got an error:Correct. I found a lot of these among the demos which come with fpspreadsheet. Not 100% sure, but I guess that the handling of include files has been changed. As I already wrote this happens if the laz_fpspreadsheet package is not added to the project requirements. If this cannot be done for some reason you must add the path to (fpspreadsheet)/source (which contains fps.inc) to the Include Files (2nd box in "Project options" > "Compiler options" > "Path").
fpstypes.pas(13,2) Fatal: Cannot open include file "fps.inc"
My project didn't compile. Got an error:Correct. I found a lot of these among the demos which come with fpspreadsheet. Not 100% sure, but I guess that the handling of include files has been changed. As I already wrote this happens if the laz_fpspreadsheet package is not added to the project requirements. If this cannot be done for some reason you must add the path to (fpspreadsheet)/source (which contains fps.inc) to the Include Files (2nd box in "Project options" > "Compiler options" > "Path").
fpstypes.pas(13,2) Fatal: Cannot open include file "fps.inc"
So the problem this problem is already solved (you helped me earlier with it).I know. Just wanted to document that your observation was correct. All the demos had been working correctly with Laz 1.8.2/fpc 3.0.2, but did not compile with 1.8.4/fpc3.0.4. This has been fixed in the current fpspreadsheet revision.
The problem I have now is with the lines:This is because CryptoInfo is a record, and the worksheet only has a getter/setter for the entire record, not for its individual elements. Create a local variable "c: TsCryptoInfo", assign the individual record elements, and then assign the entire record to the CryptoInfo of the worksheet.
swDest.Workbook.GetWorksheetByIndex(0).CryptoInfo.Algorithm:= caExcel; swDest.Workbook.GetWorksheetByIndex(0).CryptoInfo.PasswordHash:=psw;
(311,57) Error: Argument cannot be assigned to(313,57) Error: Illegal expression
swDest.Workbook.GetWorksheetByIndex(0).Protection: = [spDeleteRows, spInsertRows, spSort];