I have got the same problem with POI 3.15.
Exception LeftoverDataException was throw in RecordInputStream.java:
public boolean hasNextRecord() throws LeftoverDataException {
if (_currentDataLength != -1 && _currentDataLength !=
_currentDataOffset)
{
throw new LeftoverDataException(_currentSid,
remaining());
}
if (_currentDataLength != DATA_LEN_NEEDS_TO_BE_READ) {
_nextSid = readNextSid();
}
return _nextSid != INVALID_SID_VALUE;
}
While _currentDataLength is 24 and _currentDataOffset is 20.
And the error message as follow:
Exception in thread "main"
org.apache.poi.hssf.record.RecordInputStream$LeftoverDataException:
Initialisation of record 0x31(FontRecord) left 4 bytes remaining still to be
read.
at
org.apache.poi.hssf.record.RecordInputStream.hasNextRecord(RecordInputStream.java:174)
at
org.apache.poi.hssf.record.RecordFactoryInputStream.nextRecord(RecordFactoryInputStream.java:253)
at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:494)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:341)
at
org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:95)
at
org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:178)
at
org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:140)
--
View this message in context:
http://apache-poi.1045710.n5.nabble.com/Bug-60833-New-Initialisation-of-record-0x31-left-4-bytes-remaining-still-to-be-read-tp5726833p5726985.html
Sent from the POI - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]