You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Ka...@BigLots.com on 2004/04/26 20:39:14 UTC

excel crashes

hello,
I have an excel file consisting of 16 sheets.many of these sheets make use 
of 3D reference.
Iam trying to read the file using poi and then write to it .
problems that i faced
1)I used poi 2.5 initially and i got foll exception when tried reading the 
file( one of the sheets uses lists).
 java.lang.reflect.InvocationTargetException: 
java.lang.ArrayIndexOutOfBoundsException
        at java.lang.System.arraycopy(Native Method)
        at 
org.apache.poi.hssf.record.UnknownRecord.<init>(UnknownRecord.java:62)
        at 
org.apache.poi.hssf.record.SubRecord.createSubRecord(SubRecord.java:57)
        at 
org.apache.poi.hssf.record.ObjRecord.fillFields(ObjRecord.java:99)
        at org.apache.poi.hssf.record.Record.fillFields(Record.java:90)
        at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
        at org.apache.poi.hssf.record.ObjRecord.<init>(ObjRecord.java:61)
        at java.lang.reflect.Constructor.newInstance(Native Method)
        at 
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:224)
        at 
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:160)
        at 
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:165)
        at 
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:132)
        at TestExcel.main(TestExcel.java:25)
Exception : org.apache.poi.hssf.record.RecordFormatException: Unable to 
construct record instance, the following exception occured: null
org.apache.poi.hssf.record.RecordFormatException: Unable to construct 
record instance, the following exception occured: null
        at 
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:237)
        at 
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:160)
        at 
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:165)
        at 
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:132)
        at TestExcel.main(TestExcel.java:25)

I tried reading the same file using poi2.0.It works fine.throws no 
exception.reads the file just fine.I was surprised how come the new 
version has no support for lists.

2)Now once i read the file ,i try writing to the file.After done,and try 
opening the excel file-excel crashes and if i try to open the file in the 
recovery mode,excel complains the file is damaged,repairs it n then opens 
it.
I get the  "unknow ptg 3d(61) warning".I understand that this warning is 
related to 3D reference.
Iam not understandig what is the exact problem.

I tried to ceate a small sample excel file which contains 3 sheets.one 
sheet uses list,other 2 use 3D references,one uses a named reference in 
its formula .Iam successfully able to read/write to this sample excel file 
with out warnings,errors using poi version 2.0.

What could be the problem?
please help if you have any inputs in this issue
thanks
kamala

AW: excel crashes

Posted by Karl-Heinz Zengerle <ka...@sawag.com>.
Hi Kamala.

We had a template which is used for generating new Excel files. There we
had that warnings. When opening the generated Excel file we had the
problems mentioned yesterday in your other question.

First he created the template by copying and changing. I was checking
the Excel files (input and result) in a lot of manners, even
alternatively opening it with OpenOffice. No problem was visible for me.
So my colleague was building up that file manually and since then it
works fine again.

I also would be interested how to determine the problem in that case
(because no cell is mentioned in this message) and how to avoid such
problems in an easier way.

No feedback to my question came. So I can't make you too much hope.

Regards,	Karl-Heinz.


-----Ursprüngliche Nachricht-----
Von: KamalaPothukuchi@BigLots.com [mailto:KamalaPothukuchi@BigLots.com] 
Gesendet: Montag, 26. April 2004 20:39
An: POI Users List
Betreff: excel crashes

hello,
I have an excel file consisting of 16 sheets.many of these sheets make
use 
of 3D reference.
Iam trying to read the file using poi and then write to it .
problems that i faced
1)I used poi 2.5 initially and i got foll exception when tried reading
the 
file( one of the sheets uses lists).
 java.lang.reflect.InvocationTargetException: 
java.lang.ArrayIndexOutOfBoundsException
        at java.lang.System.arraycopy(Native Method)
        at 
org.apache.poi.hssf.record.UnknownRecord.<init>(UnknownRecord.java:62)
        at 
org.apache.poi.hssf.record.SubRecord.createSubRecord(SubRecord.java:57)
        at 
org.apache.poi.hssf.record.ObjRecord.fillFields(ObjRecord.java:99)
        at org.apache.poi.hssf.record.Record.fillFields(Record.java:90)
        at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
        at
org.apache.poi.hssf.record.ObjRecord.<init>(ObjRecord.java:61)
        at java.lang.reflect.Constructor.newInstance(Native Method)
        at 
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java
:224)
        at 
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.jav
a:160)
        at 
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:165)
        at 
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:132)
        at TestExcel.main(TestExcel.java:25)
Exception : org.apache.poi.hssf.record.RecordFormatException: Unable to 
construct record instance, the following exception occured: null
org.apache.poi.hssf.record.RecordFormatException: Unable to construct 
record instance, the following exception occured: null
        at 
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java
:237)
        at 
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.jav
a:160)
        at 
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:165)
        at 
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:132)
        at TestExcel.main(TestExcel.java:25)

I tried reading the same file using poi2.0.It works fine.throws no 
exception.reads the file just fine.I was surprised how come the new 
version has no support for lists.

2)Now once i read the file ,i try writing to the file.After done,and try

opening the excel file-excel crashes and if i try to open the file in
the 
recovery mode,excel complains the file is damaged,repairs it n then
opens 
it.
I get the  "unknow ptg 3d(61) warning".I understand that this warning is

related to 3D reference.
Iam not understandig what is the exact problem.

I tried to ceate a small sample excel file which contains 3 sheets.one 
sheet uses list,other 2 use 3D references,one uses a named reference in 
its formula .Iam successfully able to read/write to this sample excel
file 
with out warnings,errors using poi version 2.0.

What could be the problem?
please help if you have any inputs in this issue
thanks
kamala


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org