logo
search
Power Query Problems

Fix OneDrive Security Warnings and Power Query URL Errors in Excel

Maira MehtabMaira Mehtab Sep 21, 2026 868 views

Question details

The user is experiencing security warnings when opening files downloaded from OneDrive, as well as encountering HTML errors in Power Query when attempting to connect to a OneDrive web URL.

Product
Microsoft Excel
Device & OS
not provided
Scenario
Connecting to a OneDrive file via Power Query using a web URL or opening a OneDrive workbook in Excel.
Observed behavior
Excel triggers security checks and warnings for files from the internet, while Power Query fails to connect properly, returning HTML data instead of the workbook's tables due to missing authentication or an incorrect URL format.
Before you start

Verify that your Microsoft 365 installation is fully up to date and that you have your Microsoft organizational or personal account credentials ready for authentication.

Solution 1Recommended

Update Microsoft 365 and Check Security Settings

Resolve persistent internet file security warnings by keeping Excel updated and maintaining safe macro configurations.

Excel performs strict security checks on files originating from the Internet, including OneDrive links. Ensuring your client is updated minimizes false-positive warnings.

1
Update Microsoft 365

Open Excel and navigate to File > Account. Click on 'Update Options' and select 'Update Now' to ensure the latest security definitions and patches are applied.

2
Verify Trust Center settings

Go to File > Options > Trust Center and click 'Trust Center Settings'. Ensure that you do not enable all macros or unrestricted VBA access, as this drastically reduces your system's security. Set it to 'Disable all macros with notification'.

Free Microsoft Office alternative

Try WPS Office for Seamless Spreadsheet Management

If you want to avoid complicated web URL authentication errors, complex security warnings, and macro troubleshooting, WPS Office offers a highly compatible and lightweight alternative for your daily spreadsheet and data processing needs.

  1. 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
  2. 2. Install the software: Run the installer and follow the simple on-screen instructions to set up the office suite.
  3. 3. Open your data files: Launch WPS Spreadsheets and open your existing data files directly with complete formatting and formula retention.
Fully compatible with Microsoft Excel file formats (.xlsx, .xls, .csv).Lightweight and fast, loading large datasets without triggering unnecessary internet security blocks.Familiar user interface requiring zero learning curve for users switching from Excel.Robust built-in data processing tools that bypass complicated web query authentication hurdles.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Power Query return an HTML table instead of my OneDrive Excel data?

This happens when Power Query connects to the OneDrive web viewer URL instead of the direct data file, or when authentication is missing. To fix this, copy the path from the Excel desktop app via File > Info, and ensure you delete the '?web=1' parameter before connecting.

Should I enable all macros to bypass Excel security warnings for downloaded files?

No, enabling all macros or unrestricted VBA access is highly discouraged because it significantly reduces your computer's security against potentially malicious scripts. Keep your settings at 'Disable all macros with notification'.

How do I correctly authenticate a OneDrive file in Power Query?

When connecting to the cleaned URL (without the ?web=1 parameter), select the 'Organizational account' tab in the authentication window and sign in using your Microsoft 365 credentials to grant the query access to the protected data.