Description
When reading an .xlsx file that contains hyperlinks with tooltip attributes, the tooltip value is not parsed from the XML. The get_tooltip() method returns an empty string even though the tooltip was set in Excel.
Steps to Reproduce
- Create an
.xlsx file in Excel with a hyperlink that has a tooltip (Insert > Hyperlink > ScreenTip)
- Read the file with umya-spreadsheet
- Access the hyperlink via
cell.get_hyperlink().get_tooltip()
Expected Behavior
get_tooltip() returns the tooltip string (e.g., "Click to visit website")
Actual Behavior
get_tooltip() returns an empty string.
Analysis
Looking at the XML parsing path in worksheet.rs, the hyperlink deserialization reads ref, location, and r:id attributes but appears to skip the tooltip attribute from the <hyperlink> element. The OPC markup is:
<hyperlink ref="A1" r:id="rId1" tooltip="Click to visit website"/>
The tooltip attribute needs to be captured during XML deserialization.
Additional Issue: URL XML Entity Encoding
When a URL contains & characters, they are XML-escaped to & in the .xlsx XML. On read, umya does not unescape these entities, so get_url() returns URLs with literal & instead of &.
Environment
- umya-spreadsheet 2.2.x
- Discovered via ExcelBench fidelity testing
Description
When reading an
.xlsxfile that contains hyperlinks withtooltipattributes, the tooltip value is not parsed from the XML. Theget_tooltip()method returns an empty string even though the tooltip was set in Excel.Steps to Reproduce
.xlsxfile in Excel with a hyperlink that has a tooltip (Insert > Hyperlink > ScreenTip)cell.get_hyperlink().get_tooltip()Expected Behavior
get_tooltip()returns the tooltip string (e.g., "Click to visit website")Actual Behavior
get_tooltip()returns an empty string.Analysis
Looking at the XML parsing path in
worksheet.rs, the hyperlink deserialization readsref,location, andr:idattributes but appears to skip thetooltipattribute from the<hyperlink>element. The OPC markup is:The
tooltipattribute needs to be captured during XML deserialization.Additional Issue: URL XML Entity Encoding
When a URL contains
&characters, they are XML-escaped to&in the.xlsxXML. On read, umya does not unescape these entities, soget_url()returns URLs with literal&instead of&.Environment