TsWorkbook.ReadFromFile() fails to load cell values from certain XLSX lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- Sandman · 2020-12-20 18:58 Hi, everyone! Seems I need some help with TsWorkbook.ReadFromFile() I have a bunch of XLSX files as input, they are produced by some sort of service (not MS Excel, I guess). Unfortunatly, the developer of that service is out of my reach so I can`t find out the way the files were produced. When I open them with MS Excel >=2013 I get neither problems nor any warnings at all. But when I try to ReadFromFile(), I only get some format info (cells merge, row height) but no cells` values - just a blank worksheet without any exception. Yet the numbers of rows and cols are correct. Some example programs have been tested with these files (read_write\ooxmldemo\ooxmlread.lpr, visual\fpsgrid\fpsgrid.lpr) and showed the same result. I tried to investigate a bit and found out that if I open the files with MS Excel and then "save as", the result is loaded Ok. The inner structure of XLSX (archived XMLs) gets different after "save as". Since I`m not very familiar with XML I can`t figure out what is the key difference between the original files and those after MS Excel. But I have to avoid that auxiliary operation and need to load files directly using ReadFromFile() What should I do? Should I run any other sorts of tests? I use: Lazarus: 2.0.10 stable FPC: 3.2.0 stable fpSpreadSheet: 1.12.0 There in attach are the files: the original one and the one "saved as" with MS Excel (both archived). Any help or advice would be greatly appreciated! ---------------------------------------------------------------------- wp · 2020-12-20 22:38 Fixed in the svn version of fpspreadsheet. The reason for the issue was that the writing application had put the text one node level deeper into the xml structure as usual. ---------------------------------------------------------------------- Sandman · 2020-12-21 00:05 Quote from: wp on December 20, 2020, 11:38:06 pmFixed in the svn version of fpspreadsheet. The reason for the issue was that the writing application had put the text one node level deeper into the xml structure as usual. Thanks a lot, wp! Now it works just awesome!