Linking Excel Workbooks in SharePoint Online
In this article
You link Excel workbooks in SharePoint Online by uploading the files to a document library, opening one in Excel for the web or the desktop app, and then either pulling data from another workbook with a formula reference or connecting worksheets with Power Query so the data stays in sync. For a fixed, read-only copy of values, copy the data and paste it as a link. For a live connection that refreshes, use Power Query's "From File" or "From Workbook" connectors, or write a formula that points at the other workbook's URL. The one hard requirement is that both workbooks live in the same SharePoint site (or in sites your account can access) and that you use the fully qualified web address, not a local drive path.
What You'll Need
- A Microsoft 365 account with edit or read permission on the SharePoint site and library where the workbooks sit.
- Both workbooks uploaded to a SharePoint document library, ideally in the same library for simpler paths.
- Excel for the web (for quick links and shared editing), Excel on Windows or Mac (for Power Query and external references), or the Excel mobile app for viewing only.
- Exact file names without characters that break URLs, such as
#,%, or unencoded spaces. Rename before you link. - For live connections, decide whether the link should be "refresh on open" or manual, and whether other people will open the file.
Step-by-Step
- Put both files in the same library. Open the SharePoint site, go to the document library, and use Upload to add the source workbook and the destination workbook. Keep file names descriptive and free of special characters. Note that labels and menu wording can differ slightly by version, tenant setting or region.
- Get the source workbook's full link. In the library, select the source file, open the More actions menu (the three dots) and choose Copy link or Details to view the file path. Use Copy link with the default "people in your organization" setting rather than a sharing link that expires, because an expiring link will break your formula later. A link that includes a
?e=or token string is a sharing link; the plain document URL ending in.xlsxis what you want. - Decide between a copy, a formula link and a query. A pasted value is frozen and safe. A formula link stays live but is fragile. A Power Query connection is the most robust and refreshable. Pick the lightest method that meets the need.
- Option A — link a single cell with a formula. Open the destination workbook in Excel for the web or desktop. Type an equals sign, then the source file's full URL inside single quotes, followed by the sheet name, an exclamation mark and the cell address, for example
='https://yourtenant.sharepoint.com/sites/Team/Shared Documents/[Budget.xlsx]Sheet1'!B2. Press Enter. Excel converts this into an external reference and shows a dialog asking whether to update links. - Option B — import data with Power Query. In Excel on Windows or Mac, go to the Data tab, choose Get Data > From File > From Workbook (or From SharePoint Folder and then filter to the file). Paste the document URL, sign in with your Microsoft 365 account when prompted, pick the table or sheet, then choose Transform Data or Load. This creates a connection you can refresh with Data > Refresh All.
- Set the refresh behaviour. In Power Query, open the connection's properties and set whether it refreshes on file open, and whether it refreshes in the background. For external references, use Data > Edit Links (Data > Workbook Links in some versions) to confirm the source, update the path, or switch the link to values only.
- Save the destination back to SharePoint. Use File > Save or Save a Copy and point it at the same library. Keep the workbook in SharePoint rather than on your desktop, because a file opened from a local download will store a local path that breaks for everyone else.
- Test with another account or a private window. Open the destination file from SharePoint in a browser. Because Excel for the web cannot always refresh external connections, verify that cached values appear for viewers and note that a full refresh may need the desktop app. That limitation is normal, not a fault.
- Document the links. Add a small notes sheet listing which source workbook feeds the destination, who owns it, and how often it changes. This saves hours when a file is renamed.
Common Mistakes
- Using a synced local path. If you link to
C:\Users\You\...or a OneDrive-synced folder letter, the link fails for everyone else and may break when your sync location changes. Always use the SharePoint URL. - Linking to a sharing link. Links containing access tokens expire or are tied to your account. Strip them back to the plain document address.
- Renaming or moving the source. Any formula reference or saved query path that points at the old name breaks. Rename first, link second, and avoid moving files afterwards.
- Saving the destination to a personal OneDrive. Mixing a personal OneDrive destination with a team-site source creates permission problems. Keep both in the shared library.
- Assuming browser refresh equals desktop refresh. Excel for the web has narrower external-connection support. If a refresh fails in the browser, try the desktop app before assuming the file is broken.
- Leaving spaces and symbols in file names. Encoded characters in URLs are a frequent cause of "we couldn't find the file" errors.
Tips
- Keep a single "data" workbook per topic and treat it as the source of truth; have other workbooks read from it rather than copying tables around.
- Name the worksheet and use a real Excel table (Insert > Table) in the source, so Power Query picks up new rows automatically on refresh.
- Prefer Power Query over cell formulas for anything with more than a handful of cells. It survives column inserts and row changes far better.
- When you only need a snapshot, paste as values. It removes every dependency and never breaks.
- Check permissions before sharing a destination file: readers need access to the source too, or the refreshed numbers will not load for them.
- Use version history in the library (More actions > Version history) to recover a workbook after a bad refresh or overwrite.
Troubleshooting
The formula shows an error or "#REF!". Check the URL character by character, confirm the sheet name exists and matches exactly, and confirm the cell reference is valid. If the workbook was renamed, update the path through Data > Edit Links.
Excel asks for credentials repeatedly. Sign out of all Microsoft accounts in the desktop app and sign in again, then reopen the file from its SharePoint URL rather than from a synced folder. Confirm your account still has access to the library.
The query fails on refresh in the browser. Open the file in the desktop app, refresh there, and save. Browser refresh support for external data sources is limited, so desktop is the reliable path.
Numbers are stale. Use Data > Refresh All, then check whether the connection is set to refresh on open. If values were pasted rather than linked, refresh will never update them.
The file is locked or read-only. Someone may have it open, or a checkout may be active. Ask them to close it, or open the library and use Discard checkout if you own the checkout. Discarding a checkout loses unsaved changes made by whoever held it.
Access denied for a colleague. They need permission on both the destination and the source library. Grant read access to the source rather than copying data into a less protected place.
Frequently Asked Questions
Can I link workbooks stored in different SharePoint sites?
Yes, as long as your account can access both. Use the full URL of the source file. Permissions do not follow the destination file, so readers need access to the source as well.
Does the link update automatically when the source changes?
Formula references and queries pick up new data on refresh, not instantly. Refreshes happen on open if configured, or manually with Refresh All. Excel for the web refresh support is more limited than desktop.
Will the link work if someone opens the file on a phone?
Viewing works through the mobile app or browser. Editing formulas or refreshing connections is best done in Excel on a computer.
What is the difference between linking and sharing?
Sharing gives a person access to a file. Linking makes one workbook read data from another. You usually need both, because the people who see the destination must also be able to read the source.
How do I break a link but keep the numbers?
Use Data > Edit Links and choose Break Link, or copy the cells and paste as values. The values stay; the dependency disappears, so nothing breaks when the source is renamed.
Why does the linked file open slowly?
External references and queries add load time, especially over a slow connection or with large tables. Narrow the imported range to the columns you need and load to a table rather than an entire sheet.