Forum Discussion

Siminio's avatar
Siminio
Copper Contributor
Jul 29, 2026

Office Scripts does not refresh Power BI Query live connections in Excel Online

Hello everyone, I've got the following problem and am nearly going insane because it's causing so much problems 🥲

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

  1. Create an Excel workbook with a live connection to a Power BI Semantic Model.
  2. Confirm that manual Data → Refresh All refreshes the data successfully.
  3. Create an Office Script containing only:

function main(workbook: ExcelScript.Workbook) { // Refresh all data connections workbook.refreshAllDataConnections(); }

  1. 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.


No RepliesBe the first to reply