OfficeDev / OfficeDev/office-scripts-docs
Office script to refresh all data connections of the workbook not working in PowerAutomate
@wandyezj is already working on this.
Since Jun 16, 2025.
- Dominant language
- No language data
- Stars
- 235
- Forks
- 68
- Avg merge
- 6d 7h
- Merged PRs (30d)
- 2
Description
Hi experts,
I have used the Office script to refresh all data connections of the workbook. The workbook uses the OLEDB connection to the Power BI dataset.
function main(workbook: ExcelScript.Workbook) {
workbook.refreshAllDataConnections();
}
But while running this script via Power Automate, I get the following error.
**Error
Action 'Run_script' failed
We were unable to run the script. Please try again.
Office JS error: Line 2: Workbook refreshAllDataConnections: There was an internal error while processing the request.
clientRequestId: f8c5616e-ecb9-4670-9eaf-a7764e754453**
some hints please...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.