Skip to content

Internal Hyperlink generation is broken on Windows #749

@jayden-chan

Description

@jayden-chan

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions