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;