V4.4.2
Change Log:
- 1: Fixbug: Internal hyperlink does not work on wps office. (Break change) and support new internal hyperlink methods。
- 2:Add type definition for WorksheetModel.merges, Thank you ytjmt, Merged PR2281.
- 3:Add type definition for WorksheetProtection.spinCount,Thank you damingerdai, Merged PR2284.
PS: Since V4.4.2 @zurmokeeper/exceljs new cell insertion internal hyperlink support Sheet2!A1:B1
and A1:B1
and other forms, the original only supports Sheet2!A1
, use the following way::
const wb = new ExcelJS.Workbook();
const ws1 = wb.addWorksheet('Sheet1');
const ws2 = wb.addWorksheet('Sheet2');
'#' is required, @zurmokeeper/exceljs is to distinguish internal hyperlink by '#', the default will be considered non-internal hyperlink, older versions also need to manually add '#' , how not to add if
// internal hyperlink
ws1.getCell('A1').value = { text: 'Sheet2', hyperlink: '#Sheet2!A1' };
// internal hyperlink
ws1.getCell('A1').value = { text: 'Sheet2', hyperlink: '#Sheet2!A1:B1' };
// internal hyperlink
ws1.getCell('A1').value = { text: 'Sheet2', hyperlink: '#A1:B1' };