My "Setup":
Lazarus 4.6
FPC 3.2.2
fpSpreadsheet CCR version (after r9979-9981)
Windows 11
When adding defined names in worksheet everything works ok, both woth global and local names, i can use the names in formulas and all is OK , but when if I add multiple local names and save the file it's somehow corrupted and can not be opened again; ""not a valid spreadsheet file" (Multiple Global names are no problem).
I add the local names with:
with sWorkbookSource1.Worksheet do
DefinedNames.Add(Name, Index, Index, r1, c1, r2, c2);
What works:
- Multiple global names → OK, saves and open without problems
- Single local name → OK, saves and opens without problems
- Multiple local names → file becomes invalid
I have tried to find out wether my code is wrong or if I have forgotten something but no success so far, thanks in advance for any help.
A sample of a "corrupt2 testfile as ZIP is attached.