excel.js
excel.js copied to clipboard
Empty records array with node v0.12.0
After upgrading node from 0.10.36 to 0.12.0, the records array given to callback from parseXlsx is just an empty array.
The input xlsx file haven't been changed and downgrading back to node v0.10.32 resolves the issue.
This works when running job via terminal "node index.js" spits out the content of xlsx file no problem. But when I run it in the app via a drag and drop the xlsx file array comes back empty and will not render anything in html page. Might be something in our script to read our file, but can't isolate any issue.
I'm using Node v7.1.0 and I also get an empty array :(
Running from 'node index.js'
I verified that this isn't working with v7.1.0, so I will try and fix this over the weekend. As a work around for now, this does work in node v6.9.x 😄
As for node v.0.12.0, I don't have any plans for supporting any version less than the 6.x.x.
FYI, I have tested it with node v6.10.2 and it does not work either.
@carmilso me too
Same problem node v6.10.3
Is this still an issue? Sometimes it helps to isolate the code.
var parseXlsx = require('excel');
parseXlsx('./Workbook1.xlsx', function(err, data) {
if(err) {
console.log(err)
}
console.log(data)
// data is an array of arrays
});
I ran this with node 6.10.2 and it works just fine.
Thanks for the reports everybody.
@mrbatista @jackmo2014 @carmilso @clickclickonsal @mtnoronha Out of curiosity, do you know about https://github.com/SheetJS/js-xlsx? If so, why use excel.js instead of that? I haven't worked on this in a long time, and I wonder if I should just point people to that other option, or if there's something compelling about excel.js that I should make more clear or enhance.
Trevor, I didnt know about that.
I actually dicided to go for: https://www.npmjs.com/package/xlsx
But, not the prettiest syntax/usage though.
I also am getting an empty array. My node.js version is v8.9.1. Checked on node.js version v6.10.3 and it gives an array of data.