Error on read file lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- alexs75 · 2016-04-05 08:55 This file open normal in LibreOffice, but not open in fpSpreadsheet. try to open in fpspreadsheet/examples/visual/fpsctrls/demo_ctrls fpSpreadsheet rev. 4606 Lazarus 1.7 r52104M FPC 3.1.1 x86_64-linux-gtk 2 ---------------------------------------------------------------------- wp · 2016-04-05 09:21 Please be more specific: what does "not open" mean? The file opens almost correctly here (Win, same fps version, same Laz, but fpc 3.0), the demo is very slow, though, and the row heights are not correct. How did you create the file? Convert an xlsx by LibreOffice? LibreOffice has the known issue to blow xlsx files up to max row and column limits. ---------------------------------------------------------------------- alexs75 · 2016-04-05 10:01 I could not open the file - the program does not have enough memory. The file is generated from another program, then saved in LibreOffice. If this file error - advise how do I fix this file? ---------------------------------------------------------------------- wp · 2016-04-05 10:22 Running the demo in the IDE now I get an error 203 (heap overflow) when the grid is trying to expand to more than 1 million lines (your file has only 59 lines!). This case is particularly nasty because after the 59 lines the file contains xml nodes for 1048516 repeated (empty) rows with a specific row format, plus another extra (empty) row with the same format. fpspreadsheet would detect the 1048516 rows to be unnecessary, but it is confused by that additional record. The same happens with the columns: the file contains 27 data columns plus 1 specially formatted narrow empty column. But LibreOffice adds another 229 columns of some special column format plus 767 columns of default format. Again, because there are two blocks, fpspreadsheet does not consider these unexpected empty columns to be unnecessary. Should fpspreadsheet contain workarounds for fixing the bugs of other applications? I have to think about it: I could tell the ods reader to drop anything after the last data row/column. But this would drop the empty narrow column AB in your file as well - probably, this is less harmful than not being able to read the file at all. ---------------------------------------------------------------------- alexs75 · 2016-04-05 10:40 I think it's best to ignore the empty duplicate rows and columns at the end of the file. The LO, it seems to me, it does so. ---------------------------------------------------------------------- wp · 2016-04-08 19:32 Removed empty rows and columns added by LO/OO up to max count when importing xlsx files. Fixed grid hanging in case of zero-width columns. Your file now loads fine. ---------------------------------------------------------------------- alexs75 · 2016-04-11 05:52 Thx. Works good.