I'm currently struggling with the below error code in Power Automate.
We were unable to run the script. Please try again.
Office JS error: Line 8: {"message":"code":"InvalidArgument","type":"Worksheet","method":"getRange","line":8}
clientRequestId: 53f4345c-6629-4eef-a2aa-76fc5aa0b748
I made a flow that automatically filled an Excel sheet in a shared folder based on the reply of a survey in Forms.
To fill the sheet, I use a script file and it's like below.
I tried to fix but I still don't know what's wrong with this code.
function main(
workbook: ExcelScript.Workbook,
sheetName: string,
cellAddress: string,
updateValue: string
) {
let sheet = workbook.getWorksheet(sheetName);
let updateCell = sheet.getRange(cellAddress).setValue(updateValue);
let cellValue = sheet.getRange(cellAddress).getValue();
return cellValue;
}