How to create internal links #685
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#685
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm trying to generate an XLSX Excel document with JS-XLSX and I can't find a way to create the equivalent of an internal link.
I have this summary page in which I'd like to present clickable links pointing to other sheets.
I've tried many combination of cell = {l: {Target: "..", Rel: {Target: "...", Type:"Internal"}}} but it doesn't work. It always ends up as an external hyperlink in the generated document.
I'm using JS-XLSX 0.10.4.
Is this a supported use case?
As a general rule, everything is in the README. If it's not mentioned there, it's either currently unsupported or a bug in the README.
The write logic currently assumes an external hyperlink for every link and every relationship, so at the moment it is not supported. It's relatively simple to fix, we'll try to roll out something in the next release. We will have to add a new flag to the link object.
Would be great to have this feature and also the ability to add VBA code.
You can use formula.
sheet['A1'].f = '=HYPERLINK("#'Section1'!A1,"Section 1")';
In the internal representation, set a cell's
.l
key to be an object withTarget
set to the reference prepended by a#
e.g.@UzverNumber47 's approach also works
ws['A1'].l = { Target: "'#SheetName'!A1" }
is ok for me.