I still have the same problem : unable to write fo file a workbook with more than 4 spreadsheets, despite a complete re-installation of ubuntu and Lazarus.
I have completely re-installed ubuntu 18.04.10 with the option which formats the destination partition
then I have installed Lazarus 2.0.10 (with the debian packages)
FPC 3.2.0 Revision SVN universionned directory x86-64-linux-gtk2
FPS 1.12
and LibreOffice 6.0.7.3.
Attached is the project (.pas, .lfm, .lpi and .lpr files) and the two workbooks, the first with 4 Spreadsheets for which the WriteToFile works without problem, and the second with 5 Spreadsheets for which the WriteToFile does not work ; more precisely the program ends apparently without error but when I try to open the file, LibreOffice displays the following error message :
read error
format error in the file of the sub-document (in french it is: sous-document) content.xml
at position 1,62833(row,col)
The project is quite simple : first you have to select the number of spreadsheets (i.e. the workbook) and then it reads a cell, writes it in another cell (an empty one) and writes the workbook to file with the same name.
I tested the same project on another PC under windows and it works without problem for both workboks, and also with 9 spreadsheets.
Do you have any idea about the origin of that problem ?