DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=29992>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=29992 opening a excel workbook fails Summary: opening a excel workbook fails Product: POI Version: 2.5 Platform: All OS/Version: All Status: NEW Severity: Blocker Priority: Other Component: HSSF AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] We have a bit more complex excel workbook, which we need to access. When accessing the workbook (new HSSFWorkbook(.)), the exception below is thrown. I found out that this happens, while the workbook is processed / read out and that on two different pages of the workbook (manually modified), the following section causes the exception if the value of 'rectype' is 93: Throwing code section: *********************** Class: RecordFactory.java Method: createRecord Condition to fail: rectype == 93 Code: retval = ( Record ) constructor.newInstance(new Object[] { new Short((short)rectype), new Short(size), data }); Thrown Exception: ****************** java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.apache.poi.hssf.record.RecordFactory.createRecord (RecordFactory.java:232) 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 ScsRalfImporter.<init>(ScsRalfImporter.java:33) at ScsRalfImporter.main(ScsRalfImporter.java:66) Caused by: 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) ... 10 more 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:246) 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 ScsRalfImporter.<init>(ScsRalfImporter.java:33) at ScsRalfImporter.main(ScsRalfImporter.java:66) Exception in thread "main" --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
