Hi,

I'm using POI 3.7 and trying to read an Excel file. Upon instantiating an HSSFWorkbook I get the following error:

HSSFWorkbook workbook = new HSSFWorkbook(fileInputStream);

org.apache.poi.hssf.record.RecordInputStream$LeftoverDataException: Initialisation of record 0xDA left 2 bytes remaining still to be read. at org.apache.poi.hssf.record.RecordInputStream.hasNextRecord(RecordInputStream.java:156) at org.apache.poi.hssf.record.RecordFactoryInputStream.nextRecord(RecordFactoryInputStream.java:216) at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:442)
        at 
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:263)
        at 
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:188)
        at 
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:305)
        at 
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:286)
...


I have tried to open the excel file in Excel and OpenOffice, and both open the file without failure. If I resave the file from either Excel or OO, then I am able to read it without difficulty.

Is this a POI error, or a file structure error? If the later, is there any way to tell POI to ignore a LeftOverDataException?

Thanks,

Eric


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to