Connect OneDrive Excel to Power BI: The ?web=1 Fix (2026)

Connect Excel files on OneDrive and SharePoint to Power BI step by step — copy the real file URL, remove ?web=1, pick the right sign-in, and fix refresh…

You did everything right. You copied the file path straight from Excel, pasted it into Power BI, pressed OK — and Power BI told you it cannot reach your workbook. The file is right there in OneDrive. The link opens fine in the browser. So what broke?

Six characters at the end of the URL: ?web=1. That tiny suffix tells the link to open in the browser instead of pointing at the raw file — and until you delete it, Power Query cannot navigate to your workbook. This guide walks through connecting Excel files on OneDrive and SharePoint to Power BI the right way, with the ?web=1 fix exactly where it belongs: front and center.

Why Connect to OneDrive Instead of a Local File?

If you are still new to the Get Data flow itself, start with our walkthrough of connecting to data in Power BI Desktop first — this article picks up where it ends.

Step 1: Get the Real File URL from Excel

The reliable way to get a clean file URL is through Excel itself, not the browser’s address bar or the Share button:

In OneDrive, open your workbook in the Excel desktop app — any “Open in Excel” route works.

Then, inside Excel:

File → Info → Copy path — this puts the true SharePoint/OneDrive URL on your clipboard.

The copied link looks something like this:

https://contoso-my.sharepoint.com/personal/you/Documents/Sales.xlsx?web=1

Step 2: The ?web=1 Fix — Delete Everything After the Question Mark

In Power BI Desktop, go to Get Data → Web (yes, Web — not Excel; the Web connector is the one that understands SharePoint file URLs):

Get Data → Web — the connector for OneDrive and SharePoint file links.

The critical step: paste the link in the URL box, then delete the ?web=1 suffix — the question mark and everything after it — before you select OK. With the suffix, the link points at a browser view; without it, it points at the file itself. This one edit is the difference between “can’t reach the file” and a working connection.

Before:  https://contoso-my.sharepoint.com/.../Sales.xlsx?web=1
After:   https://contoso-my.sharepoint.com/.../Sales.xlsx
The From Web dialog — remove ?web=1 from the end of the URL, then select OK.

Step 3: Sign In with the Right Account Type

Choose Organizational account for OneDrive for work or school; Windows for on-premises SharePoint.

After signing in, the familiar Navigator opens with your sheets and tables — from here everything works exactly like a local Excel file.

Step 4: Make Refresh Work in the Power BI Service

After publishing, open the semantic model’s settings and edit the data source credentials — and here is the second trap this article saves you from: choose OAuth2 as the authentication method. Other methods often throw “Failed to update data source credentials” for OneDrive sources. With OAuth2 set, scheduled refresh re-reads your cloud workbook with no gateway involved. For schedules, limits, and monitoring, see our full guide to Power BI data refresh.

Bonus: A Whole Folder of Files, Not Just One

When the finance team drops a new Excel export into the same SharePoint library every month, stop connecting file by file. The SharePoint folder connector reads the entire library as a table of files:

The SharePoint folder connector lists every file in the site — filter to the library you need.
Transform Data opens the file system view — the Content column holds each workbook, ready to combine.

Filter to your folder, combine the binaries, and Power Query appends every monthly file into one table that grows automatically. That combine step is classic data transformation — our ETL in Power BI guide explains the pattern behind it.

Power Query Online (dataflows) makes this even easier with a Browse OneDrive button next to the file path box:

In Power Query Online, Browse OneDrive picks the file and writes the clean URL for you.

Troubleshooting Quick Reference

SymptomCauseFix
“Unable to connect” / can’t reach file?web=1 still in the URLDelete ?web=1 and reconnect
“Failed to update data source credentials” on refreshWrong auth method in the ServiceSet authentication to OAuth2
Access denied on a personal OneDrive fileFile not publicShare publicly + Anonymous auth, or move to OneDrive for work or school
Connection breaks after moving/renaming the fileURL changedCopy the new path from Excel and update the source

From Connected File to Finished Dashboard

A clean OneDrive connection is the perfect feed for a pre-built Power BI dashboard template — point the template’s semantic model at your cloud workbook once, and every monthly update flows straight to a governed, refresh-ready dashboard.

This guide is based on Microsoft’s official documentation SharePoint and OneDrive for Business files import; screenshots courtesy of Microsoft Learn.

Why can’t Power BI connect to my OneDrive Excel file?

Almost always because the URL still ends with ?web=1. That suffix makes the link open a browser view of the file rather than the file itself, and Power Query cannot navigate to it. Delete the question mark and everything after it, so the URL ends with .xlsx, and the connection succeeds.

What does ?web=1 mean in a OneDrive or SharePoint URL?

It is a query parameter that tells the link to open the file in the browser (Office for the web) instead of downloading or addressing the raw file. Excel’s Copy path button includes it by default. Browsers need it; Power BI does not — remove it whenever a tool needs direct file access.

Should I use the Web connector or the Excel connector for OneDrive files?

Use the Web connector in Power BI Desktop for OneDrive and SharePoint URLs — it understands cloud file paths and organizational sign-in. The Excel connector is for local file paths. In Power Query Online (dataflows), the Excel connector offers a Browse OneDrive button that handles the URL for you.

How do I fix “Failed to update data source credentials” for a OneDrive source?

In the Power BI Service, open the semantic model settings, edit the data source credentials, and set the authentication method to OAuth2, then sign in with the organizational account that can open the file. This is the documented fix for that error on OneDrive for work or school sources.

Do I need a data gateway to refresh reports built on OneDrive files?

No. OneDrive for work or school and SharePoint Online are cloud sources, so the Power BI Service refreshes them directly — no on-premises data gateway required. Just make sure the credentials are set to OAuth2 and the account still has access to the file.

Can I connect Power BI to a whole OneDrive or SharePoint folder of Excel files?

Yes — use the SharePoint folder connector. It lists every file in the site as a table with a binary Content column; filter to your library, combine the files, and Power Query appends them into one table. Each new monthly file dropped into the folder joins the model on the next refresh automatically.

All Power BI Finance Dashboard Templates