question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Internal Hyperlink generation is broken on Windows

See original GitHub issue

The following example works correctly on macOS/Linux, but not on Windows:

const Excel = require('exceljs');
const wb = new Excel.Workbook();

wb.addWorksheet('TOC').state = 'visible';
wb.addWorksheet('Test Sheet').state = 'visible';

const ws = wb.getWorksheet('TOC');

ws.getCell('A1').value = {
  text: 'Test Hyperlink',
  hyperlink: `#'Test Sheet'.A1`
};

wb.xlsx.writeFile('output.xlsx');

For the hyperlink value I have tried:

* `#'Test Sheet'!A1`
* `#"Test Sheet"!A1`
* `#'Test Sheet'.A1`
* `#"Test Sheet".A1`
* `#\\"Test Sheet\\"!A1`
* `#\\'Test Sheet\\'!A1`
* `#\\"Test Sheet\\".A1`
* `#\\'Test Sheet\\'.A1`

and a few others. None work.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Siemienikcommented, Jan 15, 2020

hyperlinks work good with URLs. I’ve never used them for internal links - probably, that hasn’t been implemented yet.

1reaction
Alanscutcommented, Feb 19, 2020

@jayden-chan I use the following code, the inline function works fine.

ws.getCell('A5').value = {text: 'Sheet2', hyperlink: '#\'Test Sheet\'!A1'};
Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Find And Fix Broken Internal Links
What can finding and fixing internal links do for your SEO? Learn why broken links matter and get tool recommendations to find and...
Read more >
Powerpoint hyperlinks to intranet sites broken since IE 11
It's recently been brought to my attention that PowerPoint files containing hyperlinks to our internal web sites are no longer working.
Read more >
Creating dynamic PDF internal links with BIRT - Stack Overflow
I am trying to create a PDF in BIRT and I need to have bookmarks linking from a summary page to each detail...
Read more >
Preventing broken links in Microsoft Word documents - IBM
If your Microsoft Word document contains links to other files, moving it to a different computer invalidates the linked information.
Read more >
SharePoint Broken Links & Durable Links - Cognillo
Common Causes for SharePoint Broken Links. Forgetting to change internal links while moving or renaming a webpage.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found