OfficeDev / OfficeDev/office-scripts-docs
Office Scripts: Refresh all Connections working as 'Recorded Action', but workbook.refreshAllDataConnections() not working when action is converted to code script
Open
@alison-mk is already working on this.
Since Aug 20, 2026.
Status: under investigation
Type: product question
- Dominant language
- No language data
- Stars
- 235
- Forks
- 68
- Avg merge
- 6d 7h
- Merged PRs (30d)
- 2
Description
Environments
Excel Online
Power Query Datasource
Issue
When I record a script and click on Refresh All Connections and run the script it successfully refreshes my Power Query Datasource:
However, if convert that same script into code, it states that it ran successfully but it doesn't update the Power Query Datasource:
I've read this may or may not be a limitation, just wanted it confirmed as I've found it strange it can be automated, but not called from code. Thanks for your help.
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.