org.apache.poi.hssf.record.RecordFormatException

Not enough data (1) to read requested (2) bytes

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web11

Stack trace

  • org.apache.poi.hssf.record.RecordFormatException: Not enough data (1) to read requested (2) bytes at org.apache.poi.hssf.record.RecordInputStream.checkRecordPosition(RecordInputStream.java:226) at org.apache.poi.hssf.record.RecordInputStream.readShort(RecordInputStream.java:243) at org.apache.poi.hssf.record.ExtSSTRecord$InfoSubRecord.<init>(ExtSSTRecord.java:62) at org.apache.poi.hssf.record.ExtSSTRecord.<init>(ExtSSTRecord.java:97) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at org.apache.poi.hssf.record.RecordFactory$ReflectionConstructorRecordCreator.create(RecordFactory.java:84) at org.apache.poi.hssf.record.RecordFactory.createSingleRecord(RecordFactory.java:334) at org.apache.poi.hssf.record.RecordFactoryInputStream.readNextRecord(RecordFactoryInputStream.java:308) at org.apache.poi.hssf.record.RecordFactoryInputStream.nextRecord(RecordFactoryInputStream.java:274) at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:478) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:344) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:401)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

We couldn't find other users who have seen this exception.