Power Query Problems

Fix Excel Power Query SharePoint User-Specific Path Error

Ayan MasoodAyan Masood Oct 28, 2026 869 views

Question details

Users need to resolve a data source error in Excel Power Query that occurs when coworkers try to refresh a connection pointing to a user-specific local SharePoint or OneDrive sync path.

Fix Excel Power Query SharePoint User-Specific Path Error
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user creates a Power Query connection to a synchronized SharePoint or OneDrive file, but when coworkers attempt to refresh the data, it fails because the file path contains the original creator's Windows username.
Observed behavior
The Power Query connection works perfectly for the creator but returns a DataSource.Error for coworkers due to the hardcoded, user-specific local directory path.
Before you start

Ensure you have the exact SharePoint or OneDrive for Business web URL for your data source file, rather than a local folder path, and verify you have the correct organizational credentials to access it.

Solution 1Recommended

Change to a Web-Based SharePoint or OneDrive Connection

Replace the local user-specific synced folder path with a universal SharePoint or OneDrive web URL so all authorized coworkers can successfully refresh the query.

When connecting to files via a locally synced OneDrive or SharePoint folder, Excel records the exact file path including your specific Windows username (e.g., C:\Users\YourName\...). To ensure coworkers can refresh the query, the data source must point to the cloud-based web URL instead of the local hard drive.

1
Retrieve the Web URL

Open the source file in Excel Online or locate it in your SharePoint/OneDrive web portal. Copy the URL from the browser's address bar. Delete any parameters at the end of the URL, such as '?web=1'.

2
Update the Data Source

Open your main Excel workbook, go to the 'Data' tab, and click 'Get Data' > 'Data Source Settings'.

3
Change the Source Path

Select the problematic local file path, click 'Change Source', and paste the copied SharePoint or OneDrive web URL into the file path box. Click 'OK'.

4
Configure Authentication

If prompted for credentials, select 'Organizational account' from the left sidebar, click 'Sign In' using your Microsoft 365 account, and then click 'Connect'.

Change to a Web-Based SharePoint or OneDrive Connection
Verify with a Coworker: After updating the path and saving the workbook, ask a coworker to click 'Refresh All' on the Data tab to confirm the DataSource.Error has been resolved.
Free Microsoft Office alternative

Try WPS Office for Seamless Spreadsheet Collaboration

Advanced data modeling tools like Power Query can sometimes lead to complex pathing and credential errors in Microsoft Excel. If you need a reliable, lightweight, and completely free alternative for your daily spreadsheet and collaboration tasks, WPS Office is an excellent choice. It offers powerful data analysis features, built-in cloud sharing, and full compatibility with standard Excel files.

  1. 1. Download and Install: Get the free WPS Office suite from the official website and install it on your device.
  2. 2. Open Your Spreadsheets: Directly open your existing .xlsx files with WPS Spreadsheet without worrying about formatting loss.
  3. 3. Collaborate in the Cloud: Use WPS Cloud to share document links with coworkers, avoiding local file path conflicts completely.
Highly compatible with Microsoft Excel (.xlsx, .xls) and CSV file formats.Free and lightweight alternative to Microsoft Office for daily spreadsheet tasks.Built-in cloud collaboration tools for easier sharing without local path conflicts.Familiar, intuitive user interface ensuring a zero-learning-curve migration.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Power Query show a DataSource.Error for my coworkers?

This usually happens when the data source path points to a local directory (like a synchronized OneDrive or SharePoint folder containing your specific Windows username) instead of a shared web location. Because your coworkers do not have the same username on their computers, Excel cannot find the file path when they try to refresh.

How do I find the correct web URL for a SharePoint Excel file?

Open the file in your web browser via SharePoint or OneDrive. Copy the URL directly from the browser's address bar. Before pasting it into Power Query, be sure to delete anything from the question mark onward (e.g., '?web=1') to ensure it links directly to the file.

Can I use system variables like %USERPROFILE% in Power Query to make the path dynamic?

Power Query does not natively resolve Windows environment variables like %USERPROFILE% directly in the Source step. While you can achieve this with complex custom M code or parameter tables, switching to the universal SharePoint web URL is generally the easiest and most robust solution.