Is there any way to modify existing excel file in node.js? I\'ve looked into exceljs but it does not provide any functionality that will just modify the existing data. It se
You can modify excel, below is the example.
var Excel = require('exceljs');
async function excelOp() {
let workbook = new Excel.Workbook();
workbook = await workbook.xlsx.readFile('question_39869739.xlsx'); // replace question_39869739.xls with your file
let worksheet = workbook.getWorksheet('sheetname'); // replace sheetname with actual sheet name
worksheet.getRow('rowNumber').getCell('cellNumber').value = 350; // replace rowNumber and cellNumber with the row and cell you want to modify
workbook.xlsx.writeFile('question_50508131.xlsx');
}
excelOp();
Have a look at https://www.npmjs.com/package/exceljs#interface for all the possible operations with exceljs.