How to Fix Excel Get Data from Web Returning HTML Login Page
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.

- 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.
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.
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.
Navigate to the 'Data' tab on the Excel ribbon, click on 'Get Data', and select 'Data Source Settings'.
In the Data Source Settings dialog, click on 'Global permissions' at the top and find the specific website URL causing the issue.
Select the URL, click the 'Clear Permissions' button, and confirm your choice. Close the settings window.
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.

Test the Web Source in Power BI Desktop
Use Power BI to verify if the issue is isolated to Excel's connector or if the website's table format has fundamentally changed.
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. Download WPS Office: Visit the official WPS website to download and install the free WPS Office suite on your device.
- 2. Open Your Spreadsheets: Launch WPS Spreadsheet and open your existing .xlsx or .csv files seamlessly with zero formatting loss.
- 3. Manage Your Data: Navigate to the Data tab to explore straightforward options for importing text, CSV, and other external data.

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.




