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 2018/03/27 07:01:10 UTC
[Bug 62222] New: getLabel for Hyperlink returns always null for xlsx
files
https://bz.apache.org/bugzilla/show_bug.cgi?id=62222
Bug ID: 62222
Summary: getLabel for Hyperlink returns always null for xlsx
files
Product: POI
Version: 3.17-FINAL
Hardware: PC
Status: NEW
Severity: critical
Priority: P2
Component: XSSF
Assignee: dev@poi.apache.org
Reporter: sasha.vitk@gmail.com
Target Milestone: ---
Created attachment 35813
--> https://bz.apache.org/bugzilla/attachment.cgi?id=35813&action=edit
Java class
hyperlink.getLabel() returns null instead of display text for hyperlink.
But in normally works for xls files and HSSF.
See attached example that shows bug.
--
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
[Bug 62222] getLabel for Hyperlink returns always null for xlsx
files
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62222
Nick Burch <ap...@gagravarr.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #3 from Nick Burch <ap...@gagravarr.org> ---
The XSSF code (for XLSX) is returning the "display" property of the underlying
CT Hyperlink xml.
Could you try renaming your .xlsx file to .zip, unzipping it, and looking in
the XML to see what your version of Excel decided to store the label as/in?
--
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
[Bug 62222] getLabel for Hyperlink returns always null for xlsx
files
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62222
--- Comment #1 from Alexander Vitkovskiy <sa...@gmail.com> ---
Created attachment 35814
--> https://bz.apache.org/bugzilla/attachment.cgi?id=35814&action=edit
xls file
--
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
[Bug 62222] getLabel for Hyperlink returns always null for xlsx
files
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62222
--- Comment #2 from Alexander Vitkovskiy <sa...@gmail.com> ---
Created attachment 35815
--> https://bz.apache.org/bugzilla/attachment.cgi?id=35815&action=edit
xlsx file
--
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
[Bug 62222] getLabel for Hyperlink returns always null for xlsx
files
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62222
Alexander Vitkovskiy <sa...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--- Comment #7 from Alexander Vitkovskiy <sa...@gmail.com> ---
Yes, string Cell velue gives display text for hyperlink (not sure that always
will match hyperlynk label from hyperlink properties).
But if you trying to create hyperlink from code and save it to xlsx, there no
way to save Label. If you creating hyperlink with Label Excel will show blank
display text\cell and setting string Cell value replacing hyperlink in cell.
--
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
[Bug 62222] getLabel for Hyperlink returns always null for xlsx
files
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62222
--- Comment #4 from Alexander Vitkovskiy <sa...@gmail.com> ---
File created in Excel 2013.
Sheet looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="x14ac"
xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"><dimension
ref="A1"/><sheetViews><sheetView tabSelected="1"
workbookViewId="0"/></sheetViews><sheetFormatPr defaultRowHeight="15"
x14ac:dyDescent="0.25"/><sheetData><row r="1" spans="1:1"
x14ac:dyDescent="0.25"><c r="A1" s="1"
t="s"><v>0</v></c></row></sheetData><hyperlinks><hyperlink ref="A1"
r:id="rId1"/></hyperlinks><pageMargins left="0.7" right="0.7" top="0.75"
bottom="0.75" header="0.3" footer="0.3"/></worksheet>
that points to hyperlynk (but there no display text):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Relationships
xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship
Id="rId1"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"
Target="pom.xml" TargetMode="External"/></Relationships>
Found it ("MavenPom") in sharedStrings.xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
count="1" uniqueCount="1"><si><t>MavenPom</t></si></sst>
I attached XLSX file to bug.
--
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
[Bug 62222] getLabel for Hyperlink returns always null for xlsx
files
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62222
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #6 from Dominik Stadler <do...@gmx.at> ---
What do you get if you read the column-value? I think that will return the text
of the hyperlink.
--
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
[Bug 62222] getLabel for Hyperlink returns always null for xlsx
files
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62222
Alexander Vitkovskiy <sa...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
--
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
[Bug 62222] getLabel for Hyperlink returns always null for xlsx
files
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62222
Alexander Vitkovskiy <sa...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--- Comment #5 from Alexander Vitkovskiy <sa...@gmail.com> ---
Also there same issue if you writing Hyperlink to Excel file. Setting address
works, but label not shows in MS Excel (cell will have blank text, but style
will be hyperlink and navigation will work)
--
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