logo
search
Data Import & Export

How to Get a Usable OneDrive Download Link for Power Query

John WilsonJohn Wilson Sep 28, 2026 869 views

Question details

The user needs to retrieve a direct, functional OneDrive download link to import data correctly using Power Query's 'From Web' feature.

How to Get a Usable OneDrive Download Link for Power Query
Product
Excel / Power Query
Device & OS
not provided
Scenario
Using the 'From Web' data source feature in Power Query to connect to a file hosted on OneDrive.
Observed behavior
Power Query imports the HTML code of the OneDrive web viewer instead of the actual data from the file when using a shortened 1drv.ms link.
Before you start

Ensure you have the original shortened OneDrive sharing link (1drv.ms) and that the file permissions allow for viewing or downloading.

Solution 1Recommended

Convert Shortened Link to Direct Download URL via Browser

Use this method to manually resolve the redirect and modify the URL parameters so Power Query bypasses the web viewer.

By default, shortened OneDrive links redirect to a web viewer. You must obtain the full URL and change the view parameter to force a file download.

1
Open the shortened link

Paste your shortened 1drv.ms OneDrive sharing link into your web browser's address bar and press Enter to load the page.

2
Copy the redirected URL

Wait for the web page to load completely. Copy the new, longer URL that appears in the address bar, which should start with onedrive.live.com.

3
Modify the URL path

Paste the copied URL into a text editor. Look for the word 'embed' in the URL and replace it with 'download'.

4
Connect in Power Query

Open Excel Power Query, select 'From Web', and paste your modified download URL to successfully import the file data.

Convert Shortened Link to Direct Download URL via Browser
Tip: If the original URL contains '?web=1' at the end, make sure to remove it when adapting the link for Power Query.
Free Microsoft Office alternative

Simplify Your Document Workflows with WPS Office

If you are tired of dealing with complex link conversions and troubleshooting Microsoft ecosystem quirks, consider switching to WPS Office. It provides a lightweight, user-friendly environment for managing all your spreadsheets and documents.

  1. 1. Download and Install: Visit the official WPS website and download the free WPS Office suite for your device.
  2. 2. Open Your Data: Launch WPS Spreadsheets and easily open your existing Excel workbooks without format loss.
  3. 3. Manage Data Easily: Use WPS Cloud for seamless, hassle-free file synchronization without needing to manage complex link parameters.
100% compatible with Microsoft Excel (.xlsx, .xls, .csv) formatsFree, lightweight, and installs in secondsFamiliar tabbed interface eliminates the learning curveBuilt-in cloud tools for straightforward file sharing and data management
microsoft office alternative - wps office

Frequently Asked Questions

Why does Power Query show an HTML table instead of my data?

When using a shortened OneDrive link (1drv.ms), Power Query connects to the OneDrive web viewer page rather than the file itself. This results in the extraction of the page's HTML elements instead of your spreadsheet data.

Do I need a specific OneDrive subscription for this to work?

No, this URL modification trick works for standard personal OneDrive accounts (onedrive.live.com). For OneDrive for Business or SharePoint, the link structure and authentication methods differ, requiring you to use the file's direct path without the '?web=1' parameter.

How do I refresh the data once connected?

Once you have successfully connected using the modified 'download' URL, you can click 'Refresh All' in the Data tab at any time to pull the latest updates directly from the hosted OneDrive file.