poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom" <dist_...@hotmail.com>
Subject Re: unable to open HSSF (generated) excel file
Date Thu, 30 Oct 2003 23:53:19 GMT
using  poi-bin-2.0-pre3-20030728
platforms- win2k and solaris.

our application queries a DB user-log table  and generates a workbook sheet that contains
3 columns (plus some header columns). the 3 columns are "username" "login-time" and "logout-time"
all cell values are writted out as strings. in some cases the workbook generated will not
open in MS-Excel 2000. i wrote a test pgm that can recreate the problem consistently, using
the the data from the DB exported into a flat file. the test pgm simply reads the file and
writes to a workbook.

i have noticed that this seems to depend on size. if i run this for records for the current
month only, the report is generated correctly. if i run it for the whole year, i am unable
to open the file. 

i noticed a similar thread in the list and as per the resolution note, i checked out the latest
code from CVS today morning and tried re-running the test pgm with the latest jars but i get
the following exception
at org.apache.poi.util.LittleEndian.putNumber(LittleEndian.java:549)
at org.apache.poi.util.LittleEndian.putShort(LittleEndian.java:282)
at org.apache.poi.hssf.record.RowRecord.serialize(RowRecord.java:465)
at org.apache.poi.hssf.record.aggregates.RowRecordsAggregate.serializeRowBlock(RowRecordsAggregate.java:244)
at org.apache.poi.hssf.record.aggregates.RowRecordsAggregate.serialize(RowRecordsAggregate.java:275)
at org.apache.poi.hssf.model.Sheet.serialize(Sheet.java:734)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.getBytes(HSSFWorkbook.java:787)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:731)
at src.ReadWriteWorkbook.main(ReadWriteWorkbook.java:61)
Exception in thread "main"

i can send out the test pgm (which is fairly straight forward) and the input test file (cannot
attach it as the zipped file size is abt 150k). can someone please help me with the problem?

note - if i try ms-excel 2002, i am able to open the file but i  get an error dialog saying
"errors detected in workbook, but ms excel was able to open it by making repairs listed below"
the repair log says that the repairs were not possible.

please let me know if i should open this as a bug or i should pose this to some other mailing

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message