logo
search
Data Import & Export

How to Fix Excel Get Data from Web Returning HTML Login Page

Huma Ashraf ChHuma Ashraf Ch Oct 12, 2026 870 views

Question details

The user needs to restore data extraction from a website because Excel is returning the HTML login screen instead of the expected data table.

How to Fix Excel Get Data from Web Returning an HTML Login Page
Product
Microsoft Excel
Device & OS
not provided
Scenario
Refreshing or setting up a web data query in Excel from a website that requires authentication.
Observed behavior
Excel downloads and displays the HTML code of the website's login page instead of fetching the targeted data table, indicating a failed authentication or expired session.
Before you start

Verify that you have the correct login credentials for the website and check if the site administrator has recently implemented new security measures or updated the page layout.

Solution 1Recommended

Clear and Update Data Source Credentials

Clearing cached web permissions forces Excel to prompt for fresh authentication, which often resolves session timeouts.

Excel saves your web credentials to speed up future queries. If the website's session expires or your password changes, Excel will fail to log in and instead retrieve the public login page.

1
Open Data Source Settings

Navigate to the 'Data' tab on the Excel ribbon, click on 'Get Data', and select 'Data Source Settings'.

2
Locate the Website URL

In the Data Source Settings dialog, click on 'Global permissions' at the top and find the specific website URL causing the issue.

3
Clear Permissions

Select the URL, click the 'Clear Permissions' button, and confirm your choice. Close the settings window.

4
Re-enter Credentials

Attempt to refresh or recreate your web query. When prompted, enter your current username and password under the 'Basic' or 'Web API' tab to authenticate.

Clear and Update Data Source Credentials
Free Microsoft Office alternative

Try WPS Office for Seamless Data Management

If Excel's web data connector continues to cause complex authentication issues, consider switching to WPS Office. It provides a lightweight, highly compatible spreadsheet application with familiar tools for managing your local and external data effectively without the heavy resource usage.

  1. 1. Download WPS Office: Visit the official WPS website to download and install the free WPS Office suite on your device.
  2. 2. Open Your Spreadsheets: Launch WPS Spreadsheet and open your existing .xlsx or .csv files seamlessly with zero formatting loss.
  3. 3. Manage Your Data: Navigate to the Data tab to explore straightforward options for importing text, CSV, and other external data.
Free, lightweight, and fast alternative to Microsoft OfficeFully compatible with Microsoft Excel file formats (.xlsx, .xls, .csv)Easy-to-use interface with familiar data management and import toolsBuilt-in PDF toolkit and seamless cloud collaboration features
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel show an HTML login page instead of my web data?

This happens when the website's session expires or the site requires updated authentication. Because Excel cannot pass the login screen, it retrieves the HTML code of the login page itself instead of the data table hidden behind it.

How do I clear cached web credentials in Excel?

Go to the Data tab, click on Get Data, and select Data Source Settings. Under the Global Permissions tab, select the website URL in question and click Clear Permissions.

Can a website block Excel from importing its tables?

Yes. Website administrators can implement anti-scraping measures, CAPTCHAs, or complex token-based authentication that blocks automated data requests from Excel's web connector.

Which authentication tab should I use for a standard website login?

When prompted for credentials in Power Query, select the 'Basic' tab if the website uses standard username and password authentication. Use 'Web API' if you are connecting via an API key.