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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Excel script failing i...
Power Automate
Unanswered

Excel script failing intermittently when run from Power Automate

(0) ShareShare
ReportReport
Posted on by

I have a flow which takes updates from an excel sheet (which has a data connection updating on a schedule) and uploads them to SharePoint. At the end of the flow I call an excel script which copies the table from one sheet to another, in order to drive the formulas in the 'Status' column (basically when the two sheets match the status is "Same", when new data comes into the data table the status will be "Update" if it is different or "New" if it is not found). The table is ~9670 rows.

 

I have never had any issues running it in Excel, but occasionally it will fail in Power Automate. It has run fine over the past few days (running every 15 mins) but then today it failed 5/10 times in the last few hours. 

 

Here is my script:

 

 

function main(workbook: ExcelScript.Workbook) {
 
let compareSht=workbook.getWorksheet("Existing")
let rosterTbl = workbook.getTable("RosterTbl");
let RosterTblSht=workbook.getWorksheet("RosterTbl")
let lastRow = RosterTblSht.getUsedRange().getRowCount()
let lastCol = RosterTblSht.getUsedRange().getColumnCount()
 let testCol: ExcelScript.RangeView = rosterTbl.getRangeBetweenHeaderAndTotal().getVisibleView()

compareSht.getRangeByIndexes(1,0,20000,15).clear()

compareSht.getCell(1, 0).copyFrom(RosterTblSht.getRangeByIndexes(1,0,lastRow+1,lastCol), ExcelScript.RangeCopyType.all,false,false)

 

 

 

 The error I see more often is:

 

 

We were unable to run the script. Please try again.
Office JS error: Line 13: Range copyFrom: The request is aborted.
clientRequestId: 46a880d9-3443-4823-aa1c-9b893e1f0859

 

 

 

Occasionally it has fails with

 

 

We were unable to run the script. Please try again.
Your file was not saved because we could not merge your changes with changes from someone else.
clientRequestId: 99cd4341-4a43-41c0-9fba-7c692b2f5fdf

 

 

 

Categories:
I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard