Copilot in Excel Cannot Read Linked Workbooks Over UNC Paths: Fix
🔍 WiseChecker

Copilot in Excel Cannot Read Linked Workbooks Over UNC Paths: Fix

When you use Copilot in Excel to analyze data that references another workbook through a UNC path, you may see an error message or a blank result. Copilot cannot follow cross-workbook references that point to network shares like \\server\share\file.xlsx. This restriction exists because Copilot operates within the security boundaries of the current workbook and does not have permission to traverse external network locations. This article explains why Copilot fails on UNC-linked workbooks and provides the exact steps to restore full AI-assisted data analysis.

Key Takeaways: Fixing Copilot with Linked Workbooks on UNC Paths

  • Excel > Data > Edit Links > Change Source: Replace the UNC path with a local or SharePoint path so Copilot can read the linked data.
  • Excel > Data > Get Data > From File > From Workbook: Import the external data directly into the current workbook instead of using linked references.
  • Power Query > Data Source Settings > Change Source: Modify the data source location to a SharePoint or OneDrive path that Copilot supports.

ADVERTISEMENT

Why Copilot Cannot Read Linked Workbooks Over UNC Paths

Copilot in Excel reads only the data that is directly stored in the active workbook. When a cell formula references another workbook through a UNC path, that external data is not loaded into the current workbook’s model. Copilot uses the Excel calculation engine and the internal data model, which do not include external links by default. The security model of Microsoft 365 prevents Copilot from accessing network file shares because those locations are not part of the Microsoft Graph. As a result, any request to summarize, chart, or analyze data that depends on a linked workbook returns an empty result or an error.

UNC paths are treated as external references. Excel stores the link as a formula, but the linked values are only updated when you open the source workbook or manually refresh the link. Copilot does not trigger a refresh. Even if the link is refreshed, Copilot still cannot read the external data because the data resides outside the active workbook’s memory. The only way to make this data available is to bring it into the current workbook through import, copy, or a direct connection to a supported cloud location like SharePoint or OneDrive.

Steps to Fix Copilot When It Cannot Read Linked Workbooks

You have three methods to resolve this issue. Choose the method that best fits your workflow and data size.

Method 1: Replace the UNC Path with a Local or SharePoint Path

  1. Open the workbook that contains the external link
    In Excel, go to the Data tab. In the Queries & Connections group, click Edit Links. The Edit Links dialog shows all external references.
  2. Select the linked workbook that uses a UNC path
    Click the link entry that starts with \\. The source field shows the full UNC path.
  3. Click Change Source
    In the Change Source dialog, browse to a local folder such as C:\Data\ or to a SharePoint document library. For SharePoint, copy the URL from the browser address bar and paste it into the File Name box. Ensure the file name matches exactly.
  4. Click OK and then Close
    Excel updates the link. Save the workbook. Copilot can now read the data because the source is either local or on SharePoint, both of which Copilot can access.

Method 2: Import the External Data Directly into the Current Workbook

  1. Open the workbook that needs the external data
    On the Data tab, in the Get & Transform Data group, click Get Data.
  2. Select From File > From Workbook
    Browse to the UNC path and select the source workbook. The Navigator pane shows the tables and sheets in that workbook.
  3. Select the sheet or table you need
    Click Load to import the data into a new worksheet or the Data Model. Copilot can now read this imported data because it resides in the current workbook.
  4. Delete the original linked formulas
    After the import is complete, remove the old external link formulas to avoid confusion. Use Edit Links to break the link if needed.

Method 3: Use Power Query to Redirect the Data Source

  1. Open the workbook that contains the Power Query connection
    Go to the Data tab and click Queries & Connections. Find the query that references the UNC path.
  2. Right-click the query and select Properties
    In the Properties dialog, go to the Definition tab. Note the current source path.
  3. Change the source to a SharePoint or OneDrive folder
    In the formula bar, replace the UNC path with the SharePoint URL. For example, change = Excel.Workbook(File.Contents("\\server\share\file.xlsx"), null, true) to = Excel.Workbook(File.Contents("https://contoso.sharepoint.com/sites/team/Documents/file.xlsx"), null, true).
  4. Refresh the query
    Click Refresh All on the Data tab. The query now loads data from SharePoint. Copilot can read this data.

ADVERTISEMENT

If Copilot Still Has Issues After the Main Fix

Copilot Returns Generic Output Instead of Tenant-Specific Data

If Copilot still returns high-level summaries that do not reflect the actual linked data, the workbook may contain cached values from the old UNC link. Clear the cache by going to File > Info > Manage Workbook > Recover Unsaved Workbooks and then close and reopen the file. Alternatively, use Data > Queries & Connections > Refresh All to force a full data refresh.

Copilot Shows an Error About Data Source Permissions

When you change the source to SharePoint, Copilot may still fail if you do not have permission to the SharePoint library. Verify that your Microsoft 365 account has at least Read access to the SharePoint site where the source workbook is stored. Contact your tenant administrator to grant access if needed. For local paths, ensure that Excel has permission to read the folder. Run Excel as administrator if the local path is restricted.

The Linked Workbook Is Stored on a NAS or External Drive

Copilot cannot read data from network-attached storage or USB drives. Copy the source workbook to a local folder or to OneDrive. Then repeat Method 1 or Method 2. After copying, update the link or re-import the data. Copilot will then have access to the file.

UNC Path vs SharePoint Path: What Copilot Can Read

Item UNC Path SharePoint Path
Copilot access Not supported Supported
Security context Windows file share permissions Microsoft 365 and Microsoft Graph
Refresh behavior Manual only Automatic when file is opened on SharePoint
Data model integration Not loaded into workbook memory Loaded into workbook memory
Best for Local-only work without Copilot Collaborative work with Copilot

After applying one of the three methods, you can use Copilot to analyze the data. For example, ask Copilot to create a pivot table of sales by region or to highlight outliers in the imported dataset. If you frequently work with linked workbooks, consider migrating all source files to SharePoint or OneDrive. This change ensures Copilot can read the data without manual link updates. As an advanced tip, use Power Query with a SharePoint folder connector so that any new file added to the folder is automatically available to Copilot in your workbook.

ADVERTISEMENT