You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Pa...@moorewallace.com on 2004/01/28 17:12:38 UTC

HSSF User Model vs Event Model

I am running into a strange issue regarding creating a new Excel doc
with the User Model and then attempting to read it with the Event Model
where the LabelSSTRecords are coming before the RowRecords.  This is
causing a null pointer when trying to set the cell values.  If I re-read
with the User Model, is works fine but I need to use the Event Model
(due to memory issues of User Model because only reading is necessary).
Is there something specific that needs to be done to ensure that the
file written by the User Model is put into the correct format to be read
by the Event Model.

 

Below is how the file is being read:

[1/28/04 10:07:59:578 CST] 37b21559 SystemOut     O rec is
org.apache.poi.hssf.record.LabelSSTRecord

[1/28/04 10:07:59:578 CST] 37b21559 SystemOut     O rec is
org.apache.poi.hssf.record.NumberRecord

[1/28/04 10:07:59:578 CST] 37b21559 SystemOut     O rec is
org.apache.poi.hssf.record.LabelSSTRecord

[1/28/04 10:07:59:578 CST] 37b21559 SystemOut     O rec is
org.apache.poi.hssf.record.NumberRecord

[1/28/04 10:07:59:578 CST] 37b21559 SystemOut     O rec is
org.apache.poi.hssf.record.RowRecord

[1/28/04 10:07:59:578 CST] 37b21559 SystemOut     O rec is
org.apache.poi.hssf.record.RowRecord

[1/28/04 10:07:59:578 CST] 37b21559 SystemOut     O rec is
org.apache.poi.hssf.record.RowRecord

 

The label and number recs belong to the rows read after they are.  

 

I am running POI 2.0 final code.

 

Thanks...