I'm currently trying to export an array to an excel file with cell formatting.
I start with this code here:
https:
But the problem is that whenever I try to export it (saving the file as an xlsx file), this is an error that appears in the console:
Uncaught TypeError: Cannot read property 'writeFileSync' of undefined xlsx.js:5182 writeSync xlsx.js:5182 writeFileSync xlsx.js:5173 process_xlsx Test.html:379 reader.onload Test.html:438
The last two lines are mostly part of the code that says
XLSX.writeFile(wb, 'sheetjs.xlsx');
I know wb is not undefined, as if I am trying to execute console.log, the excel spreadsheet is displayed correctly: |
Can someone help me? I also try to have each cell have a different formatting (IE different color / bold / filled / etc)
javascript excel xlsx
Johnti
source share