Bug 22742

Summary: Failed to create HSSFWorkbook!
Product: POI Reporter: matthew_shi <shixy>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: critical CC: manager
Priority: P3    
Version: 1.5.1   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: this is a test excel

Description matthew_shi 2003-08-27 03:48:14 UTC
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)
Comment 1 Avik Sengupta 2003-08-30 10:49:56 UTC
you will need to attach the workbook to this but for us to investigate this
further. 
Comment 2 matthew_shi 2003-09-01 01:42:45 UTC
Created attachment 8016 [details]
this is a test excel
Comment 3 Avik Sengupta 2003-09-23 15:55:06 UTC
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. 
Comment 4 Jason Height 2003-10-14 05:59:56 UTC
*** Bug 15556 has been marked as a duplicate of this bug. ***
Comment 5 Jason Height 2003-10-14 08:02:32 UTC
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