@Yutao Huang - MSFT I'm working on my first Power Automate Flow to refresh an Excel workbook, and came here to report that this still seems to be an issue. It's quite frustrating, as I'd imagine refreshing data in an Excel file is probably the most sought-after and basic type of Excel automation.
Here are the details:
- Running the Flow that includes an Excel (Business) Run Script step with the Automation Script defined in the Excel file (which is hosted in SharePoint online):

function main(workbook: ExcelScript.Workbook) {
// Refresh all data connections
workbook.refreshAllDataConnections();
}
- This results in the following Error Details:
- We were unable to run the script. Please try again. Office JS error: Line 3: Workbook refreshAllDataConnections: There was an internal error while processing the request. clientRequestId: fd28ea8d-edbe-4c75-a6a4-2b6e3879c42b
Note that when I attempted the tip from @Alan Cussen above (Omitting ()
from the workbook.refreshAllDataConnections
command, the error message does not trigger (implying a successful run of the script) but the data refresh actually does not occur (the workbook data remains stale as it was prior to the Flow running).
Can you please advise on when this will be fixed, or any workarounds for triggering a workbook Refresh All command via Power Automate? Surely there must be a way to reliably accomplish this very basic automation.
Thank you,
-Ryan