- json2xls-worker-thread.git
- test
- hand-crafted
- xlsx.js
This file ( 514B ) exceeds the allowed full mode (48 kb) size.
The editor full hight is disabled, only scrolling is allowed..
If you wish to edit a file, it is recommended to use the scroll mode as some users do not like the full height
mode, although some users like it.
const json2xls = require('../../src')
const fs = require('fs').promises
const jsonArr = [
{
foo: 'bar',
qux: 'moo',
poo: 123,
stux: new Date()
},
{
foo: 'bar',
qux: 'moo',
poo: 345,
stux: new Date()
}
];
const executeAsync = async() => {
try {
const data = json2xls.sync(jsonArr);
await fs.writeFile(`${process.cwd()}/test.xls`, data, 'binary')
} catch(e) {
console.error(e)
}
}
executeAsync()