Closed
Description
🐛 Bug Report
If the desired name of the worksheet contains characters /
, :
it does not affect on actual sheet name. When I open created file via MS Excel is see default worksheet names like 'Sheet 1'. Some versions of MS Excel also show error messages and warn about file corruption.
Lib version: 4.1.1
Steps To Reproduce
- Have
exceljs@4.1.1
installed (obviously) - Run following code:
const {Workbook} = require('exceljs')
const workbook = new Workbook()
const sheet = workbook.addWorksheet('http://a.b/c')
sheet.addRow(['a', 'b', 'c'])
workbook.xlsx.writeFile('./result.xlsx')
- See 'Sheet 1' instead of desired sheet name in created file
The expected behaviour:
Sheet name to be equal to first argument of addWorksheet
call.
Possible solution (optional, but very helpful):
If it is xlsx constraint, throw an error, when client attempts to put unsupported characters into sheet name.
Metadata
Metadata
Assignees
Labels
No labels