To move data from a web page to Excel, the most effective method is using the "From Web" feature located in the Data tab, which uses Power Query to identify and extract tables from a URL. This process allows you to pull structured data—such as pricing lists, sports statistics, or financial tables—directly into a spreadsheet without manual copying and pasting. Because this creates a live connection, you can refresh the data in Excel whenever the website updates without having to repeat the import process.

What You'll Need

  • A computer with Microsoft Excel installed (Office 365, Excel 2016, or newer are recommended for the best Power Query experience).
  • A stable internet connection.
  • The exact URL (web address) of the page containing the data you wish to extract.
  • The data on the web page must be formatted as an HTML table (using <table> tags) for Excel to recognize it automatically.

Step-by-Step

  1. Copy the Source URL: Open your web browser and navigate to the page containing the data. Click on the address bar at the top of the browser, highlight the entire URL, and copy it (Ctrl+C on Windows or Cmd+C on Mac).
  2. Open the Data Tab: Launch Microsoft Excel and open a new or existing workbook. Click on the Data tab in the top ribbon menu. Note that menu labels may differ slightly depending on your version of Excel or regional settings.
  3. Initiate Web Import: In the Get & Transform Data group, click the From Web button. This will open a small dialog box titled "From Web".
  4. Enter the URL: Paste the URL you copied from your browser into the URL field. Click OK. If this is your first time connecting to this specific website, Excel may ask you how you want to connect; in most cases, selecting "Anonymous" or the default "Basic" setting is sufficient for public websites.
  5. Analyze the Navigator Window: Excel will now analyze the web page to find all available tables. A Navigator window will appear. On the left side of this window, you will see a list of folders or tables identified by Excel (e.g., "Table 0", "Table 1").
  6. Preview the Data: Click on each table name in the list. A preview pane will open on the right, showing you exactly what data is contained in that specific table. Scroll through the preview to ensure it contains the columns and rows you need.
  7. Load or Transform: Once you have selected the correct table, you have two primary options:
    • Load: Click this to bring the data immediately into your current worksheet as a formatted table.
    • Transform Data: Click this if the web data is "messy." This opens the Power Query Editor, where you can remove unnecessary columns, filter out blank rows, change data types (e.g., changing a text column to a currency column), or split columns.
  8. Finalize the Import: If you chose "Transform Data," make your changes and then click Close & Load in the top left corner of the Power Query Editor. The data will now populate your Excel sheet.
  9. Set Up Refresh: To ensure your data stays current, right-click anywhere inside the imported table, go to Table > External Data Properties (or Query Properties), and check the box for "Refresh data when opening the file" or set a specific time interval for automatic updates.

Common Mistakes

One of the most frequent mistakes is attempting to import data from a page that uses dynamic JavaScript to load its content. Many modern websites do not load their tables until a user scrolls down or clicks a button; because Excel's "From Web" tool reads the initial HTML source code, it may report that "no tables were found" even if you can see them in your browser. Another common error is copying the URL of a specific search result or a filtered view that requires a user login. Excel cannot bypass login screens or CAPTCHAs, so if the data is behind a password-protected wall, the import will likely fail or return a login page instead of the data.

Users also often forget to check the data types after importing. For example, a website might list prices as "$1,200," which Excel may import as a Text string rather than a Number. This prevents you from using SUM or AVERAGE formulas. Failing to use the "Transform Data" step to clean these symbols often leads to calculation errors later in the project.

Tips

To handle complex websites, try to find the most "stripped down" version of the page. Some sites offer a "Print" version or a "Basic HTML" version; these are often much easier for Excel to parse because they remove heavy styling and scripts that can confuse the Power Query engine.

If you are importing multiple tables from the same website, do not start the "From Web" process from scratch for each one. In the Navigator window, you can check the box "Select multiple items" at the top. This allows you to pick five or six different tables from the same URL and load them into separate sheets in one single operation, saving significant time.

For those dealing with very large datasets, use the "Load To..." option instead of just "Load." By selecting Load To... > Only Create Connection, you can keep the data in Excel's memory without bloating your spreadsheet with thousands of rows. You can then create a Pivot Table directly from that connection, which keeps your file size small and your performance fast.

Troubleshooting

If the process does not go as planned, start with these checks in order of complexity:

1. Check the URL: Ensure the URL starts with https:// and is the direct link to the page. If the URL is extremely long (containing many search parameters), try shortening it to the base page URL to see if Excel can find the table more easily.

2. Refresh the Connection: If the data looks outdated, go to the Data tab and click Refresh All. If this results in an error, the website structure may have changed, meaning the "path" Excel was using to find the table is no longer valid.

3. Handle "No Tables Found": If the Navigator window is empty, the website is likely using a dynamic framework (like React or Angular). In this case, the "From Web" tool cannot see the data. The alternative is to manually copy the table from the browser, go to Excel, and use Paste Special > Match Destination Formatting. While this isn't a live link, it is the only way to capture JavaScript-rendered content.

4. Clear Permissions: If you get an access error on a site you previously accessed, go to Data > Get Data > Data Source Settings. Find the website in the list, select it, and click Clear Permissions. Then, try the import again to reset the connection method.

Frequently Asked Questions

Can I import data from a website that requires a password?

Generally, no. Excel's standard "From Web" tool cannot interact with login forms or multi-factor authentication. If the data is private, you will need to export the data to a CSV file from the website first and then import that CSV into Excel.

Will the Excel sheet update automatically when the website changes?

It does not update in real-time like a live stream, but it can be automated. You can set the query to refresh every X minutes or refresh automatically whenever you open the workbook via the Query Properties menu.

Why is my data appearing in one single column instead of a table?

This happens when the website uses "div" tags or custom CSS to make data look like a table, rather than actual HTML "table" tags. Excel cannot recognize these as tables. You will need to use the "Transform Data" tool to split the columns manually using a delimiter (like a comma or space).

Does this work on Excel for Mac?

Yes, but the interface and capabilities of Power Query on Mac have historically been more limited than on Windows. Ensure your macOS version and Office 365 subscription are fully updated to access the "From Web" functionality.

Can I import only a specific part of a web page?

Yes. By using the "Transform Data" option, you can filter rows, remove columns, and crop the dataset so that only the specific information you need is loaded into your spreadsheet.