FileSaver.js icon indicating copy to clipboard operation
FileSaver.js copied to clipboard

XLSX.writeFile() is getting called 2 times

Open profile4vaibhav opened this issue 7 years ago • 5 comments

Hello,

I have written a below code using XLSX:

XLSX.writeFile(workbook, 'sample.xlsx');

Now this line is getting called 2 times.

Is there any specific reason for this?

profile4vaibhav avatar Jan 07 '19 09:01 profile4vaibhav

Is XLSX a part of FileSaver.js? I can't find XLSX anywhere in th FileSaver.js code, so I think it is the wrong GitHub project that you are posting your issue...

Ruffio avatar Jan 07 '19 10:01 Ruffio

Got the same issue. rolled back to 1.3.1 and everything is working.

nicumaxian avatar Jan 11 '19 20:01 nicumaxian

@nicumaxian Can you please point me to where XLSX is a part of FileSaver.js?

Looking in the code (https://github.com/eligrey/FileSaver.js/blob/master/dist/FileSaver.js) there are nothing that says either XLSX or a method called 'writeFile'. In FileSaver you use the method saveAs (https://github.com/eligrey/FileSaver.js/blob/master/dist/FileSaver.js)

This issue should be closed.

Ruffio avatar Jan 12 '19 11:01 Ruffio

FileSaver and XLSX are two different libraries, so the issue I have posted here is related to XLSX not with FileSaver. Because I am not using FileSaver's function, I am using XLSX libraries function which is XLSX.writeFile(). That's why the issue shoudn't be close out.

profile4vaibhav avatar Jan 12 '19 12:01 profile4vaibhav

So no code is provided to demonstrate the issue and another library is used which is causing the issue, but still the an issue is filed here? That doesn't make any sense.

Nowhere in the readme does it say that other libraries are supported: https://github.com/eligrey/FileSaver.js/

I suggest that an issue is filed at the other library.

This should be closed.

Ruffio avatar Jan 12 '19 13:01 Ruffio