0

I wrote an script and here's an snippet from my code:

let workbook = new Excel.Workbook();
await workbook.xlsx.readFile('./input.xlsx');
await workbook.xlsx.writeFile('./output.xlsx');
console.log('file saved!');

I know how async/await works and there is no error! the input.xlsx is a valid excel file. but the output.xlsx can't be opened by libreOffice or Microsoft Excel. I should notice that if I comment await workbook.xlsx.readFile('./input.xlsx');, in this situation also the output.xlsx can't be read too!

It's an strange issue for me! I used exceljs many many times but I don't know why it's happening now!

exceljs version: 3.9.0

Masih IT
  • 52
  • 10

1 Answers1

0

I suppose that exceljs hasn't implemented at least one feature used in input.xlsx. Similar situation I had with images some times ago and fixed by PR: https://github.com/exceljs/exceljs/pull/702

Could I ask you to create an issue on GH?

If you want to find what exactly went wrong:

  1. unzip input.xlsx
  2. unzip output.xlsx
  3. check diff between.

You can also upload input.xlsx here, it should help to find a bug reason.

I think also, check any other version of exceljs may be helpful.

  • 1
    yeah I added [#1286](https://github.com/exceljs/exceljs/issues/1286). also I provided more information about the issue there. – Masih IT May 24 '20 at 07:37