problem writing xls file lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- nicola69 · 2013-02-19 14:57 Hi My lazarus version is 1.06 , fpc 2.6.0 , cpu icore 5 and my so is windows xp 32 bit. I use sqlite as db. I write a simple application that read a file csv , search some data in a sqlite db and write data in excel in 2003 format I use FPSpreadsheet . My problem is when I try to read a file with more than 5600 row and the excel file is the same height , my program generate excel file (.xls)  but excel 2007 don't read file and tell me that is corrupt.  i tried open with libre office 4 but i have the same problem. Could someone help me ? Thank you very much. you could download project file from https://dl.dropbox.com/u/64726031/project%20exported.zip exe compiled for win 32 and sqlite db file and sqlite3.dll https://dl.dropbox.com/u/64726031/exe.zip and a txt sample https://dl.dropbox.com/u/64726031/sample%20file%20txe.zip If you want try my program with sample txt file you have to push first button "Carica Dati ftp e Genera Excel" you have to select txt inside sample file txe.zip After few minutes my program ask you where save xls file. I read another thread http://www.lazarus.freepascal.org/index.php/topic,16716.15.html I think that I have same problem but i have download last version of lazarus.  Where i can see if my revision in more than 2454. Another question Can I save in ooxml format and it compatible with excel 2007 ? ---------------------------------------------------------------------- BigChimp · 2013-02-20 06:45 Thanks for posting detailed info. Haven't looked at your application yet. Note that the version of fpspreadsheet is independent of Lazarus as fpspreadsheet is not bundled with Lazarus. Please first try to use the newest development version of fpspreadsheet or the recently released (January) new version: http://wiki.lazarus.freepascal.org/FPSpreadsheet#Latest_release ---------------------------------------------------------------------- BigChimp · 2013-02-20 08:25 Fiddled some with the program; LibreOffice shows an empty file (if saved as .xls) even if only 400 lines are saved.... ---------------------------------------------------------------------- nicola69 · 2013-02-20 14:55 BigChimp i have donwloaded lasted svn from sourcefourge (1.1) but there is same problem  excel with more 5600 are saved in a wrong file format. ---------------------------------------------------------------------- BigChimp · 2013-02-20 15:07 Well, as I said, with the latest fpspreadsheet, I couldn't even get 400 rows to save correctly. Maybe I modified your program too much while looking at it.... ---------------------------------------------------------------------- mica · 2013-02-20 17:25 i work with this to create excel files http://avemey.com/zexmlss/index.php ---------------------------------------------------------------------- wp · 2013-02-20 21:17 I am using Lazarus 1.1/fpc 2.6 and the latest fpSpreadsheet, both from svn. If I use the excel5write or excel8write demos and add these lines Code: [Select]  for i:=1 to 60000 do     MyWorksheet.WriteUTF8Text(i, 0, 'Hallo'); the programs create a file that Excel can read without issues. You can't go up beyond line 65536 however, there is still an integer bug in the cell addresses that I reported some time ago, but which obviously has not yet been fixed. Are you sure that your fpspreadsheet is from http://lazarus- ccr.svn.sourceforge.net/viewvc/lazarus-ccr/components/fpspreadsheet/? ---------------------------------------------------------------------- grandehombre · 2013-07-02 11:09 (as per forum hint, I have created a new post, called 'Excel 2010 cannot read large(ish, 8MB) files created by fpspreadsheet') http://forum.lazarus.freepascal.org/index.php/topic,21389.0.html ---------------------------------------------------------------------- marcov · 2013-07-02 11:24 Quote from: wp on February 20, 2013, 10:17:12 pm the programs create a file that Excel can read without issues. You can't go up beyond line 65536 however, there is still an integer bug in the cell addresses that I reported some time ago Is it really a bug, or simply a limit of the format version that is being written? Older Excels did have such limit IIRC ---------------------------------------------------------------------- grandehombre · 2013-07-02 11:27 Hi, The limit that comes to mind is the 65535 row limit of earlier Excel versions... In the case I am describing (8MB file, 9000 rows) that limit is quite a distance away... Additionally, the 9000 rows do not seem to matter as much as the amount of data written: 9000 rows of 4 colums generates a smaller file that works 9000 rows of 8 colums generates an 8MB file that fails Cheers, Nick ---------------------------------------------------------------------- wp · 2013-07-02 11:36 QuoteIs it really a bug, or simply a limit of the format version that is being written? Older Excels did have such limit IIRCOlder versions yes, but from 2007 on they accept more (http://wiki.answers.com/Q/How_ many_rows_and_columns_are_there_in_Excel). My comment above was only partially correct because the excel8demo does not write an Excel 2007 file. But fpspreadsheet has the same limitation for ooxml files while the max row count is higher.