Hello everybody,
I will keep it simple. I have an angular project. I've installed with bower the last version of jszip and alasql. Afterwards I am running my code
alasql('SELECT * INTO XLSX("translation.xlsx",{headers:true}) FROM ?',[exportedValues]);
With the current version of jszip (3.0.0) it is not working. After a lot of digging on the internet I've reduced the version of jszip in my bower file from 3.0.0 to 2.0.0 and VOILA it works.
Can you please adjust this in the future?
Thank you
Thank you for letting us know. Its on the list of things to do
I updated the documentation
This might be hard to do considering the library alasql uses, SheetJS/js-xlsx, uses jszip 2.4
Hey so i downgraded the jszip to 2.4.
I found that in the xlsx.js file, in the write_zip function.
Line 11295, I have to change var zip = new jszip();
Into var zip = new JSZip();
Otherwise it won't work.
It says on the console, jszip is not a constructor.
Thanks for letting us know.
You can also, as the existing version of sheetJS add the following code after requirering jszip
if(typeof JSZip !== 'undefined') jszip = JSZip;
jszip 3 removed critical functionality that js-xlsx relied on :( so you have to fall back to an older version.
The best approach is to use the full build, which includes a compatible version of the jszip dependency. The GitHub hosted version is at http://oss.sheetjs.com/js-xlsx/xlsx.full.min.js, but you can also use CDNs like https://cdnjs.com/libraries/xlsx or https://cdn.jsdelivr.net/js-xlsx/latest/xlsx.full.min.js