POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream("D:/person.xls")); System.err.println("in POIFSFileSystem fs"); HSSFWorkbook wb = new HSSFWorkbook(fs); System.err.println("in HSSFWorkbook wb"); HSSFSheet sheet = wb.getSheetAt(0); System.err.println("in HSSFSheet sheet"); HSSFCell cell = null; HSSFRow row =null; int numRow=87; fail at HSSFWorkbook wb = new HSSFWorkbook(fs); message is java.lang.NegativeArraySizeException at org.apache.poi.hssf.record.SSTDeserializer.readStringRemainder (SSTDeserializer.java:335) at org.apache.poi.hssf.record.SSTDeserializer.processContinueRecord (SSTDeserializer.java:320) at org.apache.poi.hssf.record.SSTRecord.processContinueRecord (SSTRecord.java:539) at org.apache.poi.hssf.record.RecordFactory.createRecords (RecordFactory.java:218) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init> (HSSFWorkbook.java:191) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init> (HSSFWorkbook.java:158) at test.testExcel.main(testExcel.java:28)
you will need to attach the workbook to this but for us to investigate this further.
Created attachment 8016 [details] this is a test excel
This is the same as bug 15556. Double byte characters in the sheet, exception in SSTDeserialize. Its a biggie! No fix in sight! Not marking a dupe in bugzilla, since both contain seperate sheets, and we should test against both.
*** Bug 15556 has been marked as a duplicate of this bug. ***
This has been fixed in CVS. Both the head and the release 2 branch have been fixed. You can check if you like against your own spreadsheets with the new code, but the attachments now work for me. Jason