json2xlsx-export
v1.2.2
Published
JSON Transformer to create .xlsx files
Downloads
63
Readme
json2xlsx-export
Lightweight in browser .xlsx
exporter.
How it use since v1.2.0
import json2xlsx from 'json2xlsx-export';
const config = {
filename: 'AwesomeFile',
sheets: [
{
name: 'Sheet1',
data: [
[{
value: 'Text1',
type: 'string'
},{
value: 'Text2',
type: 'string'
}, {
value: 1000,
type: 'number'
}]
]
},
{
name: 'Sheet2',
data: [
[{
value: 'New text1',
type: 'string'
},{
value: 'New text2',
type: 'string'
}, {
value: 2000,
type: 'number'
}]
]
}
]
};
json2xlsx(config);
How it use in earlier versions
import json2xlsx from 'json2xlsx-export';
const config = {
filename: 'AwesomeFile',
sheet: {
data: [
[{
value: 'Text',
type: 'string'
},{
value: 'Another text',
type: 'string'
}, {
value: 1000,
type: 'number'
}]
]
}
};
json2xlsx(config);