用excel-paser 循环输出多sheet表格,结果报错
{ [Error: ENOENT, open '/var/folders/4m/4vxmd1xj4pd35rh39y3n2q1r0000gn/T/temp115024-2990-e248nh/convert.csv']
errno: 34,
code: 'ENOENT',
path: '/var/folders/4m/4vxmd1xj4pd35rh39y3n2q1r0000gn/T/temp115024-2990-e248nh/convert.csv' }
结果是,有一些sheet 能读出来,有一些读出来是[]…求救!!
求解救! ,sheetNum是excel表里面的sheet数量
function getExcel(sheetNum){
for(var i=1; i<=sheetNum; i++) {
excelParser.parse({
//inFile: __dirname + '/' +files.excel.path ,
inFile: __dirname + '/tmp/upload_245c235dc98f0107ba23ba37d7c8a6e4.xlsx',
worksheet: i,
skipEmpty: true
}, function (err, records) {
if (err)console.error(err);
console.log(records);
});
}
}