Bug 64450 - InvalidFormatException because of a PivotTable
Summary: InvalidFormatException because of a PivotTable
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: OPC (show other bugs)
Version: 4.1.2-FINAL
Hardware: PC All
: P2 regression with 1 vote (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-19 06:22 UTC by odelpozo
Modified: 2020-05-19 08:25 UTC (History)
1 user (show)



Attachments
XLSX File to reproduce the issue (9.65 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-05-19 06:22 UTC, odelpozo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description odelpozo 2020-05-19 06:22:45 UTC
Created attachment 37250 [details]
XLSX File to reproduce the issue

Reading an XLSX document exported from Google Sheets raises an org.apache.poi.openxml4j.exceptions.InvalidFormatException: invalid relationship part/id when the excel file contains a PivotTable.

Code:
OPCPackage.open(stream)

Exception trace: 
org.apache.poi.openxml4j.exceptions.InvalidFormatException: invalid relationship part/id
	at org.apache.poi.openxml4j.opc.PackageRelationshipCollection.parseRelationshipsPart(PackageRelationshipCollection.java:358) ~[poi-ooxml-4.1.2.jar:4.1.2]
	at org.apache.poi.openxml4j.opc.PackageRelationshipCollection.<init>(PackageRelationshipCollection.java:163) ~[poi-ooxml-4.1.2.jar:4.1.2]
	at org.apache.poi.openxml4j.opc.PackageRelationshipCollection.<init>(PackageRelationshipCollection.java:133) ~[poi-ooxml-4.1.2.jar:4.1.2]
	at org.apache.poi.openxml4j.opc.PackagePart.loadRelationships(PackagePart.java:570) ~[poi-ooxml-4.1.2.jar:4.1.2]
	at org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:734) ~[poi-ooxml-4.1.2.jar:4.1.2]
	at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:310) ~[poi-ooxml-4.1.2.jar:4.1.2]


POI version 3.17 was able to read the file with no issues.

Find attached an example.