Summary: | Getting Duplicate PageSettingsBlock record (sid=0x89c) with POI 3.6 | ||
---|---|---|---|
Product: | POI | Reporter: | Brett Zane <bzane> |
Component: | HSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED DUPLICATE | ||
Severity: | critical | ||
Priority: | P4 | ||
Version: | 3.6-FINAL | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows 2000 |
Description
Brett Zane
2010-03-04 02:27:04 UTC
I am seeing this as well, but is currently not able to produce a file that generates the error (the file that causes this is company confidential :-(). Here : http://www.dirinformatique.com/TELEBUDGET/ you can download ("Télécharger") some XLS files that don't work with POI 3.6. I have the same error with these files: org.apache.poi.hssf.record.RecordFormatException: Duplicate PageSettingsBlock record (sid=0x89c) VM: 1.6.0_17@http://java.sun.com/ at org.apache.poi.hssf.record.aggregates.PageSettingsBlock.checkNotPresent(PageSettingsBlock.java:227) at org.apache.poi.hssf.record.aggregates.PageSettingsBlock.readARecord(PageSettingsBlock.java:215) at org.apache.poi.hssf.record.aggregates.PageSettingsBlock.addLateRecords(PageSettingsBlock.java:639) at org.apache.poi.hssf.model.Sheet.(Sheet.java:222) at org.apache.poi.hssf.model.Sheet.createSheet(Sheet.java:158) at org.apache.poi.hssf.usermodel.HSSFWorkbook.(HSSFWorkbook.java:287) at org.apache.poi.hssf.usermodel.HSSFWorkbook.(HSSFWorkbook.java:201) at org.apache.poi.hssf.usermodel.HSSFWorkbook.(HSSFWorkbook.java:183) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) The problem was fixed in r892468 in Dec 2009. It was after POI-3.6, so you need to download the latest nightly build to try the fix. All "Télécharger" files are opened OK with POI trunk. Nightly builds can be downloaded from http://encore.torchbox.com/poi-cvs-build/ Yegor *** This bug has been marked as a duplicate of bug 48026 *** I'm trying to use the most recent snapshots, as you suggested (with 3.6 I'm getting the exception even after re-saving the file). Having downloaded and after putting into the classpath: poi-3.7-SNAPSHOT-20100415.jar poi-ooxml-3.7-SNAPSHOT-20100415.jar poi-contrib-3.7-SNAPSHOT-20100416.jar I was getting exceptions (ClassNotFound) and also had to put into the classpath: poi-ooxml-schemas-3.7-SNAPSHOT-20100415.jar xmlbeans-2.3.0.jar dom4j-1.6.1.jar Now I'm getting Exception with any file, I'm trying to open (even simple Excel 97): org.apache.poi.POIXMLException: org.apache.poi.openxml4j.exceptions.InvalidFormatException: Package should contain a content type part [M1.13] at org.apache.poi.util.PackageHelper.open(PackageHelper.java:41) at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:176) at org.is.jxlpoi.JXLPOIWorkbook.getWorkbook(JXLPOIWorkbook.java:29) Do you have a suggestion? (for a particular snapshot, later than r892468, to use) thanks vasili sorry, here is the end of StackTrace: Caused by: org.apache.poi.openxml4j.exceptions.InvalidFormatException: Package should contain a content type part [M1.13] at org.apache.poi.openxml4j.opc.ZipPackage.getPartsImpl(ZipPackage.java:147) at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:588) at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:222) at org.apache.poi.util.PackageHelper.open(PackageHelper.java:39) ... 21 more Also tried less recent snapshots - getting the same problem/exception... Please, help! Please, disregard my message. I've started to use WorkbookFactory and now it is fine. (I'm using the most recent snapshot). |