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

Empty records array with node v0.12.0

Open mechanicalduck opened this issue 10 years ago • 10 comments

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.

mechanicalduck avatar Mar 26 '15 00:03 mechanicalduck

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.

Magiccamera avatar Sep 16 '16 04:09 Magiccamera

I'm using Node v7.1.0 and I also get an empty array :(

Running from 'node index.js'

mtnoronha avatar Feb 24 '17 14:02 mtnoronha

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.

clickclickonsal avatar Feb 24 '17 17:02 clickclickonsal

FYI, I have tested it with node v6.10.2 and it does not work either.

carmilso avatar Apr 07 '17 10:04 carmilso

@carmilso me too

moyuanhua avatar Apr 27 '17 15:04 moyuanhua

Same problem node v6.10.3

mrbatista avatar May 28 '17 18:05 mrbatista

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.

clickclickonsal avatar Jul 17 '17 04:07 clickclickonsal

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.

trevordixon avatar Aug 25 '17 20:08 trevordixon

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.

mtnoronha avatar Oct 06 '17 19:10 mtnoronha

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.

shivampandey2021 avatar Dec 20 '17 13:12 shivampandey2021