Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Why would a Excel Script such as myTable.deleteRowsAt(0, rowCount); time out with less than 50 rows in the table?

(2) ShareShare
ReportReport
Posted on by 5

I am trying to run a simple script on Power Automate to delete all rows on a table.

 

There are just a few rows in that table (less than 50), still it times out. If I have even fewer rows, such as 20 rows, it works. How come it work to delete 20 rows and not to delete 45 rows? We are not talking about thousands of rows here! It will always be far less than 500 rows.

 

This is the script that times out:

"function main(workbook: ExcelScript.Workbook) {

let myTable = workbook.getTable("Table1");

let rowCount = myTable.getRowCount();

myTable.deleteRowsAt(0, rowCount);

}"

 

Error Details:

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

Office JS error: Line 5: Table deleteRowsAt: Timeout

clientRequestId: b98371ca-e968-4f50-a08f-c10082ab9e33

 

It times out after 35s.

  • MichelleRanMSFT Profile Picture
    Microsoft Employee on at
    Re: Why would a Excel Script such as myTable.deleteRowsAt(0, rowCount); time out with less than 50 rows in the table?

    Hi @d_maciel, I'm sorry to hear you're running into this issue - I tested out the script you shared and it seems to work in Power Automate just fine for me (on a simple table with 45 rows). Does the script work if you run it from the Code Editor? If not, could you share a bit more information about your flow and the structure of your table?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,653 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow