json2xls icon indicating copy to clipboard operation
json2xls copied to clipboard

Update idea for README

Open zentek-marco-bruening opened this issue 5 years ago • 0 comments

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.

zentek-marco-bruening avatar Jul 01 '19 14:07 zentek-marco-bruening