mgcrea / node-xlsx

NodeJS excel file parser & builder
Other
2.96k stars 274 forks source link

How to build base on a xlsx file? #129

Closed klibing closed 4 years ago

klibing commented 4 years ago

How to build base on a xlsx file?

Wil-g2 commented 4 years ago

Use this example for build base on a xlsx file: const file = xlsx.parse('./test.xlsx'); // read file xlsx

console.log(file); // print context xlsx in console

var buffer = xlsx.build(file, options); // Returns a buffer

fs.writeFile('test1.xlsx', buffer, function (err) { //save xlsx in disk

if (err) throw err;

console.log('File is created successfully.');

});

/* remember import fs for save file in disk /

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.