logo
search
Power Query Problems

How to Get a OneDrive Folder Path for Power Query

Huma Ashraf ChHuma Ashraf Ch Oct 1, 2026 869 views

Question details

The user needs to find a way to connect Power Query to a OneDrive folder to import data.

How to Get a OneDrive Folder Path for Power Query
Product
Microsoft Excel
Device & OS
not provided
Scenario
Importing or querying data files stored in a OneDrive Personal or OneDrive for Business directory using Power Query.
Observed behavior
Power Query lacks a direct cloud connector for OneDrive Personal, requiring alternative routing like local folder sync paths or API integration, unlike OneDrive for Business which works natively.
Before you start

Verify whether your account is OneDrive Personal or OneDrive for Business, as the connection methods are completely different. If you plan to use the local path method, ensure your OneDrive desktop application is actively running and syncing files.

Solution 1Recommended

Use a Synchronized Local Folder Path (OneDrive Personal)

The most straightforward workaround for OneDrive Personal is to query the local folder synced to your hard drive instead of the cloud URL.

Since Power Query does not offer a native connector for OneDrive Personal, you can treat your synced OneDrive folder like any other local directory on your PC.

1
Locate the OneDrive folder

Open Windows File Explorer and navigate to your local OneDrive folder containing the files you want to query.

2
Copy the folder path

Click on the address bar at the top of File Explorer to highlight the path (e.g., C:\Users\YourName\OneDrive\DataFolder) and copy it.

3
Launch Power Query

Open Excel, go to the 'Data' tab, click on 'Get Data', select 'From File', and choose 'From Folder'.

4
Paste the path and load

Paste the copied local folder path into the prompt box, click 'OK', and proceed to transform or load your data.

Use a Synchronized Local Folder Path (OneDrive Personal)
Path limitations: Local folder paths contain your specific Windows username. If you share this Excel file with a colleague, the Power Query refresh will fail on their computer because their local OneDrive path will have a different username.
Free Microsoft Office alternative

Experience Seamless Data Management with WPS Office

If you are frustrated by the complex connectivity requirements and subscription costs of Microsoft Excel, WPS Office provides a lightweight, free, and highly compatible alternative for everyday spreadsheet management.

  1. 1. Download the software: Visit the official WPS Office website to download the free installation package.
  2. 2. Install WPS Office: Run the setup file and follow the quick instructions to install the suite on your device.
  3. 3. Open your spreadsheets: Launch WPS Spreadsheet and open your existing data files directly with zero format loss.
Free and lightweight Office suite with rapid installationFully compatible with Microsoft Excel (.xlsx) formatsBuilt-in cloud integration for straightforward file accessFamiliar user interface for seamless and instant migration
microsoft office alternative - wps office

Frequently Asked Questions

Can I use a sharing link to connect OneDrive Personal to Power Query?

No, Power Query does not support using standard OneDrive Personal sharing URLs directly in the 'From Web' connector. You must use the local synchronized folder method or build a custom connection via the OneDrive API.

Why does my Power Query refresh fail when I send the Excel file to a colleague?

If you connected using a local synchronized OneDrive folder, the file path contains your specific Windows profile username. When a colleague opens the file, their local path is different, causing the data refresh to fail.

How do I find the correct root URL for OneDrive for Business?

Open your OneDrive for Business in a web browser. Copy the address bar URL up to the end of your personal directory identifier (usually ending in something similar to /_layouts/15/onedrive.aspx) and remove any extra string parameters to use in the SharePoint Folder connector.