Guys
I am trying to read an excel file using POI. I get the following error when I
try to open this Excel file.
--------------------------------------------------------------------------
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:550)
at org.apache.poi.hssf.record.RecordFactory.createRecords
(RecordFactory.java:221)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>
(HSSFWorkbook.java:207)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>
(HSSFWorkbook.java:174)
at com.edftrading.enrg.excel.XlFilePOI.<init>(XLFilePOI.java:144)
at com.edftrading.enrg.excel.XlFilePOI.<init>(XLFilePOI.java:111)
at com.edftrading.enrg.excel.XlFile.<init>(XLFile.java:28)
-----------------------------------------------------------------------------
XlFile f = new XlFile(ins); /* ': Open the excel file passing an InputStream
(ins) to the excel file. I get error on the same line (constructor) */
/* ': XlFilePOI is a class to open the excel file. */
public XlFilePOI(java.io.InputStream ins, int sheetnumber)
throws java.io.IOException {
is = ins;
fs = new POIFSFileSystem(is);
wb = new HSSFWorkbook(fs);
//df = new HSSFDataFormat(wb);
setSheet(sheetnumber);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/