When I useed HSSF packages to parseing a execl file , it throws me some error , like follows 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:216) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init> (HSSFWorkbook.java:151) at poitest.ExcelParser.<init>(ExcelParser.java:23) at poitest.runer.main(runer.java:44) . I am sure this excel file is a formal and well excel file.But HSSF can't parse this file. Would you support some FTP for me to update this file to you!!!!!
Please also try this with 1.8 http://jakarta.apache.org/builds/jakarta-poi/dev/bin/jakarta-poi-1.8.0-dev-bin.tar.gz we recently had a number of internationalization fixes. Please attach the files to this bug (click "Create a new attachment"). Include: the file that is giving the problem and the minimum amount of code possible to reproduce the error. Label the format of any file attached (Java class, Zip file, XLS, etc) because I hate to guess :-) Thanks for assisting us in diagnosing this problem.
If we don't get a reply within a week or so I'll close this.
Created attachment 3309 [details] mainFunctionJava
Created attachment 3310 [details] java file
Created attachment 3311 [details] execl file
I tryed the newest poi packages you said , it is still has the error I describe before
Created attachment 3962 [details] Similar but different kind of Exception, ArrayIndexOutOfBoundsException on SSTDeserializer.readStringRemainder()
Sometimes when I modify the file a bit, or copy and paste the content to a new workbook in Excel, the POI package could read the file again. However, I still couldn't figure out the rule to avoid the bug.
more detail stacktrace: java.lang.ArrayIndexOutOfBoundsException at org.apache.poi.util.LittleEndian.putNumber(LittleEndian.java:550) at org.apache.poi.util.LittleEndian.putShort(LittleEndian.java:242) at org.apache.poi.hssf.record.SSTDeserializer.readStringRemainder (SSTDeserializer.java:339) at org.apache.poi.hssf.record.SSTDeserializer.processContinueRecord (SSTDeserializer.java:320) at org.apache.poi.hssf.record.SSTRecord.processContinueRecord (SSTRecord.java:540) at org.apache.poi.hssf.record.RecordFactory.createRecords (RecordFactory.java:210) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init> (HSSFWorkbook.java:140) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init> (HSSFWorkbook.java:175)
I'm undergoing same troubles and think it's critical, because I can't use it ever. I've done everything I could do(various version and step for long time), but failed. A quick reply would very much faciliate making application.
The same here. All my application implementation is done, just waiting for this bug to be fixed in order to roll out. Unfortunately I am not familiar with XLS binary format and couldn't provide any fix on it.
Created attachment 4098 [details] This is a solution.
I'm in China and developing a software using POI. This is my first bug about POI and had to change the source. I think it's resolved. When develpoing, I met many bugs about fareast String. I'll reported later.
Please resubmit against the HEAD in cvs per the instructions: http://jakarta.apache.org/poi/getinvolved/index.html and then change the status back to valid...
Created attachment 4130 [details] a patch file
should have been reopened not resolved
Changed the Platform and OS categories of this bug to "ALL".
Make POI handle chinese better
hi i am trying to parse a biiiig xls file with about 6000 rows and i get the following error java.lang.NegativeArraySizeException at org.apache.poi.hssf.record.SSTDeserializer.readStringRemainder(SSTDes erializer.java:335) at org.apache.poi.hssf.record.SSTDeserializer.processContinueRecord(SSTD eserializer.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:1 91) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:1 58) at com.om.client.ui.struts.action.pmf.supplierfeed.UploadProductListActi on.perform(UploadProductListAction.java:101)
hi guys Before I can use POI,I fixed three bug.I can't wait the Apache project to solve this problem.Because our project is time critial project. Hope Apache can pay more attention to Chinese char(GB or Big5 encoding).
Can someone create sufficient junit tests and update this patch against the REL_2_BRANCH. What is lacking in our Chinese support is Chinese developers. I think the last time I played with this patch it failed the unit tests.
Fixed in CVS. Will go into next release - 2.0pre4 Testcases added with supplied excel files. Thanks.