Skip to content

Hyperlink tooltip attribute not parsed from XML on read #305

@wolfiesch

Description

@wolfiesch

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

  1. Create an .xlsx file in Excel with a hyperlink that has a tooltip (Insert > Hyperlink > ScreenTip)
  2. Read the file with umya-spreadsheet
  3. 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 &amp; in the .xlsx XML. On read, umya does not unescape these entities, so get_url() returns URLs with literal &amp; instead of &.

Environment

  • umya-spreadsheet 2.2.x
  • Discovered via ExcelBench fidelity testing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions