convert xlsx to json, csv, etc (more will follow)
$ npm install --save xlsx-converter
const {convert} = require('xlsx-converter');
convert('file.xlsx').then(result => {
// do something with the result
console.log(result);
});
Convert to
type: String the file extension to convert to
default: json
options
- json
- csv
convert('file.xlsx', { to: 'csv' });
An array containing the sheetPages to convert (as an number or by name).
type: Array sheetPages to convert
default: converts all
example ['1', '2']
note: ['1', '2'] and ['Sheet1', 'Sheet2'] have the same result
convert('file.xlsx', { to: 'csv' });
Write the result
type: String destination
convert('file.xlsx', { write: 'out.json' });
Work in progress
Documented options are available except converting to csv
soon
When finding an issue consider creating a gh-issue for easy follow up.
You can find open issues here.
That wraps it up