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
#834 3 comments 0 reactions 1 assignee View on GitHub

@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:
Image

However, if convert that same script into code, it states that it ran successfully but it doesn't update the Power Query Datasource:
Image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.