OfficeDev / OfficeDev/office-scripts-docs
Office Scripts: workbook.refreshAllDataConnections() no longer refreshes Power BI Semantic Model live connections in Excel Online
@alison-mk is already working on this.
Since Aug 17, 2026.
- Dominant language
- No language data
- Stars
- 235
- Forks
- 68
- Avg merge
- 6d 7h
- Merged PRs (30d)
- 2
Description
Summary
The Office Scripts method workbook.refreshAllDataConnections() no longer refreshes a live connection to a Power BI Semantic Model in Excel Online.
Environment
- Excel Online
- Office Scripts
- Power Automate ("Recurrence" + "Run Office Script")
- Live connection to a Power BI Semantic Model (Analyze in Excel)
Expected behavior
Calling
workbook.refreshAllDataConnections();
should trigger the same refresh as manually selecting Data → Refresh All in Excel Online.
Actual behavior
The script completes successfully without any error, but the workbook does not requery the Power BI Semantic Model.
Additional observations
- The same workbook worked correctly for approximately two years.
- The issue started around mid-July 2026.
- Manual Data → Refresh All in Excel Online refreshes successfully.
- Refreshing in Excel Desktop also works correctly.
- The problem occurs both:
- when running the Office Script manually from the Automate tab in Excel Online
- when running the same Office Script from Power Automate ("Run Office Script")
This suggests the issue is specific to the Office Scripts implementation of refreshAllDataConnections() rather than the workbook, authentication, or the Power BI connection itself.
Steps to reproduce
- Create an Excel workbook with a live connection to a Power BI Semantic Model.
- Confirm that manual Data → Refresh All refreshes the data successfully.
- Create an Office Script containing only:
function main(workbook: ExcelScript.Workbook) {
// Refresh all data connections
workbook.refreshAllDataConnections();
}
- Run the script.
Result
The script finishes successfully but no refresh is performed.
Expected result
The workbook should requery the Power BI Semantic Model exactly as when using the manual Refresh All button in Excel Online.
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.