Closed harminder-emobx-com closed 7 years ago
Can you test against one of the known good files (try https://github.com/SheetJS/test_files/blob/master/AutoFilter.xlsx?raw=true )
Hi @SheetJSDev
I tested this file i got following response
xlsx.full.min.js:2 Uncaught Error: End of data reached (data length = 55274, asked index = 65021). Corrupted zip ?
at n.checkIndex (xlsx.full.min.js:2)
at n.setIndex (xlsx.full.min.js:2)
at h.readCentralDir (xlsx.full.min.js:2)
at h.load (xlsx.full.min.js:2)
at new h (xlsx.full.min.js:2)
at n.r.exports [as load] (xlsx.full.min.js:2)
at new n (xlsx.full.min.js:2)
at sv (xlsx.full.min.js:21)
at Object.cv [as read] (xlsx.full.min.js:21)
at FileReader.fr.onload (registration_crud?_mode=edit&id=189_Student_process1:420)
am i doing anything wrong
Hi @SheetJSDev
Please suggest
@harminder-emobx-com the problem is in the encoding. readAsText
does not work with binary files. You should either be using readAsArrayBuffer
or readAsBinaryString
. Follow the examples from https://github.com/sheetjs/js-xlsx#parsing-workbooks .
@harminder-emobx-com i think problem is in XLSXReaderService.readFile , you should pass the proper file for XLSX.
readAsBinaryString solved the problem :)
readAsBinaryString solved my problem too. Thank you!
Hi
I am trying to parse excel file using this js library. I was successfully able to parse xls file. But when i am trying to parse .xlsx file its giving me error. Is their anything else require to be done. Please share.
I am using following code.
I am getting following error