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