Created attachment 25460[details]
Excel file that causes the crash
Hi,
Opened the attached workbook using the following code:
public static Workbook openWorkbook(Resource res)
throws IOException, InvalidFormatException
{
InputStream in = null;
try {
in = res.openInputStream(task);
return WorkbookFactory.create(in);
} finally {
if (in != null) try {in.close();} catch (IOException e) {}
}
}
The line: WorkbookFactory.create(in); produced the following exception:
org.apache.poi.hssf.record.RecordInputStream$LeftoverDataException: Initialisation of record 0xFF left 2 bytes remaining still to be read.
at org.apache.poi.hssf.record.RecordInputStream.hasNextRecord(RecordInputStream.java:155)
at org.apache.poi.hssf.record.RecordFactoryInputStream.nextRecord(RecordFactoryInputStream.java:216)
at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:392)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:276)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:201)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:317)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:298)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:60)

This is ASF Bugzilla: the Apache Software Foundation bug system. In case
of problems with the functioning of ASF Bugzilla, please contact
bugzilla-admin@apache.org.
Please Note: this e-mail address is only for reporting problems
with ASF Bugzilla. Mail about any other subject will be silently
ignored.