Need help to export and import excelsheet using js

Need help to export and import excelsheet using js
0.0 0

#1

Hi, I want to get some columns from one excel file and update the same to another excel file… I tried to load the file using activex but its showing some error in vscode editor
"Uncaught ReferenceError: Excel is not defined" pls help!!


#3

sample code that I got from google

var workbook = new Excel.Workbook();
workbook.xlsx.readFile("c://users/user/desktop/Test.xlsx").then(function () {
            
var worksheet=workbook.getWorksheet('Sheet1');
            
//Get Lastrow
var row = worksheet.lastRow
            
//Update a cell
row.getCell(1).value = 5;
 
row.commit();
 
//Save the workbook
return workbook.xlsx.writeFile("c://users/user/desktop/Test.xlsx");
 
});

#4

@Jyosiva,
from what I understand you are trying to import an excel spreadsheet in JS and exporting the data from that spreadsheet into another.
A quick search online yielded the following resources:


Hope that helps