cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ikmalfikri
Helper I
Helper I

Error Running Office Script

Hi,

I have problem with Power Automate running Office Script...If i run the script manually through excel, it works fine..but on power automate,
We were unable to run the script. Please try again.
Office JS error: Line 7: Range getSurroundingRegion: The requested resource doesn't exist.
clientRequestId: f73b00f4-74ac-4b9c-b558-c21c80c03dcd

The script is to create table'

workbook.addTable(selectedSheet.getRange("A1").getSurroundingRegion(), true);

4 REPLIES 4
DamoBird365
Microsoft
Microsoft

@ikmalfikri 

 

Can you share a screenshot of the excel script action and the full script please?

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

CFernandes
Super User
Super User

Hello @ikmalfikri 

 

Do you have a value in the cell A1 or is it blank. Only if you cell is blank you will get the error. 

 

Please add values in A1 and then try to run your script it should not give you an error. 

 

CFernandes_0-1620199627867.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Capture.JPG

Here...I delete the Column A first because the column by default is left empty

Hello...
No...the A1 has value after i delete column A

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,489)