You've already forked lazarus-ccr
fpspreadsheet: Move hyperlinkdemo to "others" folder. Make sure that "other" demos write their output in the project directory.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7995 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -14,6 +14,8 @@ var
|
||||
sheet: TsWorksheet;
|
||||
cell: PCell;
|
||||
c: TsCryptoInfo;
|
||||
dir: String;
|
||||
|
||||
begin
|
||||
book := TsWorkbook.Create;
|
||||
try
|
||||
@ -35,10 +37,11 @@ begin
|
||||
sheet.Protection := [spDeleteRows, spDeleteColumns, spInsertRows, spInsertColumns];
|
||||
sheet.Protect(true);
|
||||
|
||||
book.WriteToFile('protected.xls', sfExcel8, true);
|
||||
book.WriteToFile('protected.xlsx', sfOOXML, true);
|
||||
dir := ExtractFilePath(ParamStr(0));
|
||||
book.WriteToFile(dir + 'protected.xls', sfExcel8, true);
|
||||
book.WriteToFile(dir + 'protected.xlsx', sfOOXML, true);
|
||||
// Note ODS does not write the excel password correctly, yet. --> protection cannot be removed.
|
||||
book.WriteToFile('protected.ods', sfOpenDocument, true);
|
||||
book.WriteToFile(dir + 'protected.ods', sfOpenDocument, true);
|
||||
|
||||
finally
|
||||
book.Free;
|
||||
|
Reference in New Issue
Block a user