You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2009/07/10 01:21:15 UTC
DO NOT REPLY [Bug 47504] New: xlsx files with hyperlinks to document
locations gives error: A segment shall not hold any characters other than
pchar characters. [M1.6]
https://issues.apache.org/bugzilla/show_bug.cgi?id=47504
Summary: xlsx files with hyperlinks to document locations gives
error: A segment shall not hold any characters other
than pchar characters. [M1.6]
Product: POI
Version: 3.5-dev
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
AssignedTo: dev@poi.apache.org
ReportedBy: lnelson@llnl.gov
Created an attachment (id=23953)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=23953)
sample workbook that POI 3.5-beta6 cannot open
Problem:
I created a simple xlsx file (Tried using both Excel 2008/Mac and 2007/Windows)
by doing the following:
1) Create new workbook
2) Add a shape to workbook (Insert->Picture->Shape)
3) Right-click the shape, select Hyperlink...
4) Select "Document" (or "Place in this Document") as the link type
5) Click "Locate..." choose "Cell Reference", then select a cell on a sheet
6) Save file
(I will attach this workbook to the bug)
Try to read the xlsx file with POI (3.5-beta6), using the following code:
XSSFWorkbook wb = new XSSFWorkbook("test-hyperlink.xlsx");
Get the following exception:
Exception in thread "main" org.apache.poi.POIXMLException:
org.apache.poi.openxml4j.exceptions.InvalidFormatException: A segment shall not
hold any characters other than pchar characters. [M1.6]
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:152)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:163)
at org.apache.poi.util.TestLoad.main(TestLoad.java:49)
Caused by: org.apache.poi.openxml4j.exceptions.InvalidFormatException: A
segment shall not hold any characters other than pchar characters. [M1.6]
at
org.apache.poi.openxml4j.opc.PackagePartName.checkPCharCompliance(PackagePartName.java:370)
at
org.apache.poi.openxml4j.opc.PackagePartName.throwExceptionIfPartNameHaveInvalidSegments(PackagePartName.java:270)
at
org.apache.poi.openxml4j.opc.PackagePartName.throwExceptionIfInvalidPartUri(PackagePartName.java:185)
at
org.apache.poi.openxml4j.opc.PackagePartName.<init>(PackagePartName.java:83)
at
org.apache.poi.openxml4j.opc.PackagingURIHelper.createPartName(PackagingURIHelper.java:443)
at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:234)
at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:244)
at org.apache.poi.POIXMLDocumentPart.read(POIXMLDocumentPart.java:244)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:150)
... 2 more
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 47504] xlsx files with hyperlinks to document
locations gives error: A segment shall not hold any characters other than
pchar characters. [M1.6]
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47504
Yegor Kozlov <ye...@dinom.ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Yegor Kozlov <ye...@dinom.ru> 2009-07-12 00:39:44 PST ---
Fixed in r793280 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=793280 )
POI didn't properly process OPC packages containing relationships with targets
starting with '#'.
In your case the problem was caused by a hyperlink relationship attached to the
sheet drawing:
<Relationship Id="rId1"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"
Target="#Sheet1!A1"/>
The '#' character indicates an internal target (e.g. cell region).
Regards,
Yegor
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org