Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

excel import is not working #30

Open
pandeysoni opened this issue Jul 2, 2014 · 16 comments
Open

excel import is not working #30

pandeysoni opened this issue Jul 2, 2014 · 16 comments

Comments

@pandeysoni
Copy link

var parseXlsx = require('excel');
file = __dirname + '/test/spreadsheets/' + file;
parseXlsx(file, function(err, data) {
console.log(file);
console.log(data);
});

@pandeysoni pandeysoni changed the title function is not working excel import is not working Jul 3, 2014
@ggomez1973
Copy link

+1

@paroney
Copy link

paroney commented Feb 23, 2015

Same issue here. Been using older version for a while now successfully, but had to download a new version for a new ubuntu server and the array is always empty. (regardless of spreadsheet used).

@pandeysoni
Copy link
Author

There is one excelParser.js in root.Use that file and install respective dependencies. It worked for me.
var parseXlsx = require('./excelParser.js')
parseXlsx('spreadsheets.xlsx', function(err, data) {
console.log(file);
console.log(data);
});

@robinvanb
Copy link

Everything is working fine on my mac, but on the ubuntu server the results are always empty. Anyone else have this?

@trevordixon
Copy link
Owner

@robinvanb Has it ever worked for you on Ubuntu? Is this a new problem for you?

@robinvanb
Copy link

@trevordixon This was my first time deploying it to Ubuntu, are you suggesting it doesn't work on Ubuntu?

@trevordixon
Copy link
Owner

I would think it would work on Ubuntu, but I don't think I've ever tried. I'd be very surprised if it's never worked on Ubuntu, but I can't be sure it hasn't.

@paroney
Copy link

paroney commented Mar 8, 2015

The only way I could get it working on Ubuntu was to remove the dependencies and reload them afresh (but sorry I forget the exact details)

@gregl83
Copy link

gregl83 commented Jun 23, 2015

Ubuntu (gnome): 15.04
Node: v0.12.4

var excel = require("excel");

excel('/path/to.xlsx', function(err, res) {
    // todo something with err and res
});

Uncaught exception:

/home/ubuntu/source-module/node_modules/excel/node_modules/node-promise/promise.js:147
      throw new Error("This deferred has already been resolved"); 

@IstoraMandiri
Copy link

+1

Getting an empty array [] for all excel files; doesn't happen on mac

@gandhigani
Copy link

same issue here. working fine on my mac but not working on ubuntu server. any fixes?

@aularon
Copy link

aularon commented Apr 15, 2016

Double check your nodejs version. Works fine with me with 0.12 and 4.x, but not with 0.10 (default with some ubuntu installations).
When switching node versions (using nvm for example), you mostly have to get rid of node_modules folder and install again.

@timtribers
Copy link

Getting empty return [ ] on Windows with Node (tried v4 and v6). Put in a little bit of debug logging into extractData() and can see that it is throwing this error:

Error: Could not locate the bindings file. Tried:
 → D:\ ... \node_modules\libxmljs\build\xmljs.node
 → D:\ ... \node_modules\libxmljs\build\Debug\xmljs.node
 → D:\ ... \node_modules\libxmljs\build\Release\xmljs.node
 → D:\ ... \node_modules\libxmljs\out\Debug\xmljs.node
 → D:\ ... \node_modules\libxmljs\Debug\xmljs.node
 → D:\ ... \node_modules\libxmljs\out\Release\xmljs.node
 → D:\ ... \node_modules\libxmljs\Release\xmljs.node
 → D:\ ... \node_modules\libxmljs\build\default\xmljs.node
 → D:\ ... \node_modules\libxmljs\compiled\6.10.0\win32\x64\xmljs.node
    at bindings (D:\ ... \node_modules\bindings\bindings.js:88:9)

@anthonyjesmok
Copy link

I can testify to this as well. Using this module on my Mac works fine, but on Ubuntu it produces an empty array.

@trevordixon
Copy link
Owner

@anthonyjesmok @timtribers Thanks for looking into it!

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.

@anthonyjesmok
Copy link

Thanks for responding @trevordixon it is great to hear from you and respond to these issues. I will take a look into js-xlsx and see if that fits my needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests