https://bz.apache.org/bugzilla/show_bug.cgi?id=61041
Bug ID: 61041
Summary: my code can't read the xlsx, casuse by: ZIP_Read:
specified offset out of range
Product: POI
Version: 3.16-FINAL
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
org.apache.poi.openxml4j.exceptions.InvalidFormatException: Can't read content
types part !
at
org.apache.poi.openxml4j.opc.internal.ContentTypeManager.<init>(ContentTypeManager.java:102)
at
org.apache.poi.openxml4j.opc.internal.ZipContentTypeManager.<init>(ZipContentTypeManager.java:54)
at
org.apache.poi.openxml4j.opc.ZipPackage.getPartsImpl(ZipPackage.java:253)
at
org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:758)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:298)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:201)
at
org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:319)
at XlxsReader.main(XlxsReader.java:14)
Caused by: org.apache.poi.openxml4j.exceptions.InvalidFormatException:
ZIP_Read: specified offset out of range
at
org.apache.poi.openxml4j.opc.internal.ContentTypeManager.parseContentTypesFile(ContentTypeManager.java:401)
at
org.apache.poi.openxml4j.opc.internal.ContentTypeManager.<init>(ContentTypeManager.java:100)
... 7 more
I don't know why,the Excel downloaded from a website.It's so weird,when it's
downloaded completely,I opened it with EXCEL and I deleted the last blank line
(for example,the 28th line has data,but the 28th is the last .I deleted the
29th or more and I ran my code, it worked).
But i did nothing and opened it with Office,it was normal.I just wanna know how
to solve it.Office 2007 and above
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]