xlsb errors #1140
@SheetJSDev I already tried what was recommended in XHR for this, but that doesn't work with XLSB files, only with XLSX.
Using an "arrayBuffer" as the responseType returns as null. I get the data back when I change it to "binary" however, returning a Uint8Array gives an empty array.
When I try and read it in directly from the req.reponse using the various types, that doesn't work either.
Maybe you should specifically put an example with a XLSB file on there since it appears to be more difficult and has no real documentation anywhere? I can't use n XSLX or CSV file as it greatly increases the file size.
There should be no difference. If the mechanism works for XLSX it should equally work for XLSB.
Can you view the XLSB file in the preview at https://oss.sheetjs.com/ (download the file manually then click and drag into the box in the window)? If you can, then there's likely an integration issue.
Also, can you share the offending XLSB file and the good XLSX file? You can attach in an email to dev at sheetjs dot com.
It does work on the website version...I will go check the code out
One more place to look: if it's working with an XLSX file but you think it isn't working with an XLSB file, is the XLSB request 404'ing? Try to inspect the XHR response and make sure you are actually getting the file.
Now it is giving me data with using the new Uint8Array(req.response) line but when I use XLSX.read(data, {type: 'array'}) it throws:
"Uncaught TypeError: jszip is not a constructor"
OK got it to work...had to switch from xslx.js to full.min.js
Good to hear!