Hi am getting an error while importing .xlsx files, pls anybody help out resolve this issue,,
{ [Error: Command failed: ] killed: false, code: 1, signal: null }
var excelParser = require('excel-parser');
excelParser.worksheets({
inFile: 'file'
}, function(err, worksheets){
if(err) console.error(err);
console.log(worksheets);
});
Do you have Python "xlrd 0.9.3" library installed? I recieved the same error as you with one file. But after installing lib, it changed to something more clear:
File "/usr/lib/python2.7/zipfile.py", line 763, in _RealGetContents
raise BadZipfile, "File is not a zip file"
zipfile.BadZipfile: File is not a zip file
] killed: false, code: 1, signal: null }
Probably the file is damaged. After resaving with LibreOffice it's opened well. You may also try to change file extension to zip and unpack it, mine throws an error.
The Node.js Excel-Parser got Fixed.
For this file node_modules/excel-parser/utils.js
, we need to define full path of python.
Line number 96 :
var cmd = [
"/home/kumar/anaconda/bin/python",
__dirname + "/convert.py"
];