Forum > FPSpreadsheet

Excel 2010 cannot read large(ish, 8MB) files created by fpspreadsheet

(1/4) > >>

grandehombre:
Hi,

I am using Lazarus v1.0.10  i386-win32-win32/win64,  FPC v2.6.2 on Win7-64.
I use fpspreadsheet (can't find version numbers in source, however, it was extracted from fpspreadsheet-1.1.zip)

I use the excel8write and uncomment the looper in line 45, I generate a 9000 lines file with 8 columns (instead of just 4 shown in the example).
This creates a 7MB file (attached test2a.xls)   which Excel2010 rejects.

If I reduce the file size by using just 4 columns but still 9000 rows. Excel has no problems reading this (attached file test2b.xls)

Please note that, in the excel8write demo, I also changed the lines used in that 9000 row loop from WriteAnsi.. to WriteUTF8Text.

I have attached a zip file that contains the failing xls file (due to attachment restrictions I can't attach both)

Cheers,
Nick

BigChimp:
Why don't you post the source code in another post then? Saves us having to guess/reconstruct ;)

Edit: tried to open the .xls file in LibreOffice 4.0.4=>result: 1 sheet without any contents... Also creation date in properties was something like 0000-00-00 which doesn't seem right either.

wp:
I can confirm the behaviour in the first posting, however, it seems to depend on the number of columns and on the amount of text in each cell. With 9000 rows and a single character text in each cell, I can write more than 32, but less then 64 columns. But with a string of length 105 I cannot write even 4 columns.

You probably should post a bug report.

grandehombre:

--- Quote from: BigChimp on July 02, 2013, 01:39:22 pm ---Why don't you post the source code in another post then? Saves us having to guess/reconstruct ;)

Edit: tried to open the .xls file in LibreOffice 4.0.4=>result: 1 sheet without any contents... Also creation date in properties was something like 0000-00-00 which doesn't seem right either.

--- End quote ---


Please find attached 1.zip containing the modified source for excel8write. I could not include the EXE due to attachment size restrictions.
Thanks for replying!

BigChimp:
Great, thanks! Should be no need for the exe as we should be able to compile this ourselves.

NB (for future reference): no need to include the .o file; you can fairly easily get only the source files by using project/publish project and zip up the resulting directory...)

Navigation

[0] Message Index

[#] Next page

Go to full version