Skip to content
This repository was archived by the owner on Aug 13, 2025. It is now read-only.

Conversation

@Sajito
Copy link
Contributor

@Sajito Sajito commented Jan 22, 2025

The elements inside a worksheet are defined as a sequence, meaning excel expects the elements in a specific order.
Hyperlinks currently are written before sheetData, but must come after sheetData, otherwise it will fail to read them.
Also internal links need to be stored in location, which currently get's lost during save.

This fixes #836. Also it adds support for handling internal links in Excel-readable way.

- Write hyperlinks after sheetData, as excel can't read them if they come before sheetData
- Don't add hyperlink with Location to relations. Location is used to store links to locations within the same xlsx file and must not have a linked external relation
- Add support for hyperlink location to diskv CellStore
@cossbow
Copy link

cossbow commented Feb 17, 2025

I had the same trouble, so I tested the patch myself, and it worked fine except that it didn't automatically turn blue and underline. You need to manually set the style.

@tealeg tealeg merged commit e41b457 into tealeg:master Feb 17, 2025
1 check passed
@tealeg
Copy link
Owner

tealeg commented Feb 17, 2025

@Sajito thank you so much! Sorry for the slow review.

@Sajito
Copy link
Contributor Author

Sajito commented Feb 17, 2025

@tealeg thanks for merging!

Could you also review and possibly merge #834? It was closed automatically, but is still relevant. I can create a new pr for it, if needed.

@Sajito Sajito deleted the fix/hyperlinks-in-excel branch February 21, 2025 07:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

error when save xlsx file with hyperlink

3 participants