web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / We were unable to run ...
Power Automate
Unanswered

We were unable to run the script. Please try again.

(0) ShareShare
ReportReport
Posted on by 5

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;
}
 
 David999_0-1708408183431.png
Categories:
I have the same question (0)
  • v-yueyun-msft Profile Picture
    on at

    Hi , @David999 

    Your office script seems has no error. Your error code means that you pass the invalid cellAddress in the getRange() function.

    Can you check what the value you pass to the Office script in the flow?

     

    Best Regards,

    Yueyun Zhang

  • David999 Profile Picture
    5 on at

    Thank you for your reply. I double-checked what values are delivered to each cell but there's nothing strange. I think it could be a kind of temporary bug(?) since this error doesn't always happen.

  • Verified answer
    v-yueyun-msft Profile Picture
    on at

    Hi , @David999 

    If you can run it successfully, but the error has occurred a few times, then it is indeed possible that it is a temporary error, because your code really doesn't look like a problem, if the pass value doesn't change.

     

    Best Regards,

    Yueyun Zhang

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard