Native node.js Excel file parser. Only supports xlsx for now.
git clone https://github.com/shibucafe/excel.js.git excel
(edited by @shibucafe)
var parseXlsx = require('excel');
parseXlsx('Spreadsheet.xlsx', function(err, data) {
if(err) throw err;
console.log(data);
// [ { sheetNum: 1, , sheetName: 'hoge', contents: (array of arrays) }, ... ]
});
If you have multiple sheets in your spreadsheet,
parseXlsx('Spreadsheet.xlsx', [2, 3], function(err, data) {
if (err) throw err; // if sheet2 or sheet3 does not exist, an error occurs
console.log(data);
// [ { sheetNum: 2, sheetName: 'hoge', contents: (array of arrays) }, { sheetNum: 3, sheetName: 'hoge', contents: (array of arrays) } ]
});
MIT License.
Author: Trevor Dixon [email protected]
Contributors:
- Jake Scott [email protected]
- Fabian Tollenaar [email protected] (Just a small contribution, really)
- amakhrov