0

In my electron application excel module returns no errors, but always an empty array

const parseXlsx = require('excel');
parseXlsx(stream, function(err, data) {
    if(err) cb(err,null);

    cb(null,data);
});

data does not depend from stream param, whether it is path or stream.

In Node.js application this module works as expected.

Thanks in advance

Maxim
  • 243
  • 3
  • 18

1 Answers1

0
npm install excel --save

var parseXlsx = require('excel');

parseXlsx('Spreadsheet.xlsx', function(err, data) { //need to pass path to excel-shhet or stream
  if(err) throw err;// throw error
  console.log(data);// data is an array of arrays
});
 Or

use this

check this answer