json2xls
json2xls copied to clipboard
Update idea for README
Hi, I wanted to get the correct binary excel data but without saving it to a file.
const xlsx = json2xls({
example: "very nice"
});
As your README says, I have to store it as a file:
fs.writeFileSync('data.xlsx', xlsx, 'binary');
I thought that i have to read it back to get its binary data buffer. But I could also use:
const realXlsx = new Buffer(xlsx.toString("binary"), "binary");
It would help other people if you could add that to your README file.