We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Guide Video Here
"npm install xlsx"
const wb = xlsx.readfile(./<file_name>.xlsx);
const wb = wb.Sheets['<name_of_the_sheet>'];
const data = xlsx.utils.sheet_to_json(ws);
fs.writeFileSync("./datajson.json", JSON.Stringfy(newData, null, 2)); //datajson.json is the file name
let content = JSON.parse (fs.readFileSync ('./datajson.json', 'utf8'));
let newWB = xlsx.utils.book_new();
let newWS = xlsx.utils.json_to_sheet(content);
xlsx.utils.book_append_sheet (newWB, newWS, 'new data'); // new data is the name of the sheet
xlsx.writeFile(newWB, "newExcel.xlsx");