xlsxfromjson
v1.0.1
Published
Fork of the zipcelx project with support for adding multiple worksheets
Readme
xlsxfromjson
Lightweight JSON to xlsx creation in browser. Fork of zipcelx. This version supports adding multiple sheets.
Example Use
import xlsxfromjson from 'xlsxfromjson';
function createExcelFile() {
const config = {
filename: 'Test',
sheets: {
sheet1: {
data: [
[{
value: 'Income - Webshop',
type: 'string'
}, {
value: 1000,
type: 'number'
}]
],
sheetName: 'Test Sheet'
},
sheet2: {
data: [
[{
value: 'Income - Webshop2',
type: 'string'
}, {
value: 2000,
type: 'number'
}]
],
sheetName: 'Test Sheet2'
}
}
};
xlsxfromjson(config);
}
export default createExcelFile;