Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug] Hyperlink with a # part is read back without its target

Open Beginner friendly
#1,138 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
backend

Research direction

Start at HyperlinkTagHandler.startElement and reproduce the issue with extraHyperlinkFragment.xlsx, focusing on hyperlinks that contain both location and r:id. Verify the external target and fragment are combined into the returned address, while internal links still use location alone; confirm the expected addresses for both examples.

Written by the indexing model from the issue text.

Description

bug
Search before asking
  • I searched in the issues and found nothing similar.
Fesod version

main

JDK version

any

Operating system

Linux

Steps To Reproduce

Open an .xlsx whose cell A1 links to an external URL that has a fragment,
e.g. https://example.com/page#section.

<!-- xl/worksheets/sheet1.xml -->
<hyperlink ref="A1" r:id="rId1" location="section" display="frag"/>
<hyperlink ref="A2" r:id="rId2" display="plain"/>

<!-- xl/worksheets/_rels/sheet1.xml.rels -->
<Relationship Id="rId1" Target="https://example.com/page" TargetMode="External" Type=".../hyperlink"/>
<Relationship Id="rId2" Target="https://example.com/plain" TargetMode="External" Type=".../hyperlink"/>

extraHyperlinkFragment.xlsx

Current Behavior
[section, https://example.com/plain]

The fragment is reported as if it were a link inside the workbook, and the URL https://example.com/page is lost.

The same happens to a link to a cell in another workbook, other.xlsx#Sheet1!A1, which is stored the same way:

<hyperlink ref="A1" r:id="rId1" location="Sheet1!A1"/>
<Relationship Id="rId1" Target="other.xlsx" TargetMode="External" Type=".../hyperlink"/>

It is read back as Sheet1!A1, which looks like a link to a cell in the workbook being read.

Expected Behavior
[https://example.com/page#section, https://example.com/plain]

and other.xlsx#Sheet1!A1 for the other-workbook link. This is what POI returns for the same files (XSSFHyperlink.getAddress()).

Anything else?

HyperlinkTagHandler.startElement treats location and r:id as either/or: when location is present it reports it and returns before resolving r:id. That is right for links inside the workbook, which only carry location, but an external link with a # part carries both.

Are you willing to submit a PR?
  • I'm willing to submit a PR!
Dominant language
Java
Stars
6.2k
Forks
532
Avg merge
22h 29m
Merged PRs (30d)
25

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/fesod

All issues in apache/fesod

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.