Trying to automatically recalculate an Excel worksheet every second using Office Script. Unfortunately, my initial approach did not succeed.
function sendUpdate(sheet: ExcelScript.Worksheet) {
console.log('hi');
sheet.calculate(true);
}
function updateSheet(workbook: ExcelScript.Workbook) {
let activeSheet = workbook.getActiveWorksheet();
setInterval(sendUpdate, 1000, activeSheet);
}
No output is displayed on the console and the recalculation process does not occur as expected.