rs := TResourceStream.Create(HINSTANCE, 'TEST_FILE', 'FILE');
AFAIK, there is no resource type "FILE", I've only seen the RT_XXXX constants as last argument here. And for a file embedded in a resource, I'd expect it to be RT_RCDATA (in unit LCLType). So, the correct call, in my opinion, would be
rs := TResourceStream.Create(HINSTANCE, 'TEST_FILE', RT_RCDATA);
And when I embed a file created by myself (using LibreOffice v7.3.7) into the the resources (Project options > Resources > Add), the file can be read correctly without an error, and without leaving a memory leak.
With your file, however, I am getting an arithmetic overflow, and even my LibreOffice Calc complains about too many columns when I try to load it.
According to //
http://en.wikipedia.org/wiki/List_of_spreadsheet_software#Specifications, an ods file up to v7.3 can hold at most 1024 columns. And in fact, the "table:table-cell" node of each row in your ods file looks like this:
<table:table-cell table:number-columns-repeated="16372" />
This means that there are at least 16372 columns - way too much. I noticed in above specification link, however, that Calc v7.4 allows up to 16384 columns, but FPSpreadsheet is not yet up-to-date with that new specification.
The ods reader of FPSpreadsheet does detect this error situation and refuses to read cells if they were found beyond the 1024 columns limit. But in this case the method TsSpreadOpenDocReader.ReadCell did return an undefined value in the argument AColsRepeated.
This is fixed now in the svn repository. You can fix your OPM version easily, too: Open file fpsOpenDocument.pas, find the code for this method, and add "AColsRepeated := 0;" as first statement. Then recompile the fpspreadsheet package.
After this modification I could also load your file without error, and without memory leak.