poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilia Ternovich <ternov...@gmail.com>
Subject NullPointerException in DocumentInputStream
Date Fri, 09 Dec 2011 10:14:48 GMT
Hi!

I'm trying to read this exel file using POI (works on MS Office 2003/2010
perfectly):
http://export.dns-shop.ru/up/price/price-moscow.zip

And I've got following exception:

Warning, incorrectly terminated empty data blocks in POIFS block listing
(should end at -2, ended at 0)
java.lang.NullPointerException
at
org.apache.poi.poifs.filesystem.DocumentInputStream.readUShort(DocumentInputStream.java:301)
 at
org.apache.poi.hssf.record.RecordInputStream$SimpleHeaderInput.readRecordSID(RecordInputStream.java:98)
at
org.apache.poi.hssf.record.RecordInputStream.readNextSid(RecordInputStream.java:177)
 at
org.apache.poi.hssf.record.RecordInputStream.<init>(RecordInputStream.java:115)
at
org.apache.poi.hssf.record.RecordInputStream.<init>(RecordInputStream.java:103)
 at
org.apache.poi.hssf.record.RecordFactoryInputStream.<init>(RecordFactoryInputStream.java:165)
at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:439)
 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)
 at
org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:60)

Moreover this workbook is correctly parsed by JExcelApi (no
errors/exceptions)


Please advise.

Thanks!

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message