Our server-side application uses POI 1.5.1 to generate Excel files, which are then streamed over HTTP to the browser. Generally this process works fine, but some streamed files cause Excel to crash. The crash does not appear to be version-specific (we see the same results in Excel 97 and Excel XP). The Excel document generated always has 2 worksheets. We see the crash typically when there are > 300 rows and > 150 columns in one of the worksheets. I have read bug reports that Excel will crash if > 256 columns are used, but this is not the case for our worksheets. All our cell values are written as Strings. We don't use formulas or any other of the more sophisticated Excel facilities. I will attach an example file that exhibits this problem.
Created attachment 7079 [details] A sample Excel file generated by POI that will crash Excel when it tries to load it
Have you attempted to use 2.0pre? 1.5 is quite old.
I suspect this is fixed in the 2.0-pre2 as soon as its released. We're nearing release of 2.0 and so all bug fixes are going into that release.
information asked for but not given.
Even with 2.0-pre3 files larger than 1MB crash with Excel.
please attach the minimum simplest amount of code necessary to reproduce it with a main (or as a junit test case, better yet). It's not the file size, I generate files >1mb all the time. File size is the most frequent red herring. Certain bugs or conditions just happen mroe in big files.
Created attachment 7768 [details] POITest.java
Created attachment 7769 [details] POITest.java with rows 0-821 creates files not loadable with Excel 2000 (9.0.3821 SR-1)
the only workaround is to load the Excel file with Open Office and to save it again. But still that's not sufficient.
Created attachment 7801 [details] output Excel file generated from POITest
tested the code attached with latest CVS, and the file opens perfectly in Excel XP *** This bug has been marked as a duplicate of 15375 ***