Hi, I run this Office Script from a Power Automate flow on an Excel file in SharePoint:
function main(workbook: ExcelScript.Workbook) {
workbook.refreshAllDataConnections();
const ws = workbook.getActiveWorksheet();
ws.getRange().getFormat().autofitColumns();
}
The workbook uses Power Query to load the latest file from a folder (Folder connector → sort by date → keep first).
Power Automate reports success, but the data doesn’t update. It only refreshes when I open the file and do a manual right‑click → Refresh.
Tried:
- Power BI dataset refresh (pointing to the Excels) → didn’t update the workbook’s queries.
- Local scheduled refresh every 3 minutes → works locally, but not after saving to SharePoint.
- Permissions and connections look fine; no concurrent editors.

Report
All responses (
Answers (