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.
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?
WarrenBelz
146,653
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional