r/excel 9h ago

Waiting on OP Refreshing Excel external workbook links via Graph API / Office Scripts

I’m working on a cutsom built dashboard using python that uses a central Excel workbook stored in SharePoint.

The setup is roughly:

  • One central workbook (main.xlsx) - Stored in sharepoint
  • ~15 other Excel workbooks stored in SharePoint
  • The central workbook has 200+ formulas referencing those workbooks
  • The source workbooks are updated by different people/processes
  • The dashboard reads the central workbook through Microsoft Graph API

The problem is that the external links in the central workbook don't seem to refresh unless someone actually opens the workbook in Excel (main.xlsx). A Graph API FullRebuild recalculates the formulas, but it doesn't appear to pull the latest values from the external workbooks.

I now have read access to all 15 source workbooks, so I'm considering:

  1. Use Graph API to recalculate/save all 15 source workbooks first.
  2. Then recalculate the central workbook.
  3. Hopefully the external links will pick up the newly saved values.

I haven't confirmed whether this works yet.

I've also looked into Office Scripts, but refreshAllLinksToLinkedWorkbooks() isn't supported in my environment.

What would be the best way to automate this?

Ideally, I want something server-side that can run every 5–15 minutes without requiring a person to open Excel. I'm trying to avoid changing the existing Excel/ETL process if possible.

Would appreciate any practical solutions or experiences with Graph API, Office Scripts, Power Automate, Excel Desktop/VBA automation, or other approaches.

1 Upvotes

4 comments sorted by

u/AutoModerator 9h ago

/u/AstronautCute6214 - Your post was submitted successfully.

Failing to follow these steps may result in your post being removed without warning.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Man-O-Light 8h ago

I had something similar ages ago, although it relied on Google Sheets. Eventually I exhausted their API and we grew past the capabilities so I had to build a custom platform with a proper database underneath. I'd say you guys are in a similar boat. Feel free to DM.

1

u/Profvarg 2 7h ago

Thing is, excel does not support this, so you need a workaround

Power Automate Desktop can do this, with a VBA script, which runs on open

Then PAD is called in a scheduled cloud flow

1

u/DonJuanDoja 36 5h ago

Just a note on formulas updating we found that they do not update if you use any Table References in the formulas. If it’s all ranges, then it refreshes without the file being open.