New Tool Radar

AI for Data & Spreadsheets

How to Extract a Stock Price Table from a Web Page into Excel with Power Query

Import a stock price table from a web page into Excel with Power Query From Web and check each price against the page.

Schematic illustration for How to Extract a Stock Price Table from a Web Page into Excel with Power Query: three numbered steps - Data, Get Data, From Web; Pick the price table; Check prices against the page.

A price table on a web page changes daily, and copying it by hand means the sheet is out of date the next morning. Power Query From Web imports the table into Excel and can refresh it from the live page, but each price still needs checking against the page, because a table can load with the wrong columns.

Prerequisites

  • Excel with Power Query
  • The web page address holding the price table
  • A copy of the source file, so the original stays untouched.

Steps

  1. In Excel, go to Data, Get Data, From Other Sources, From Web, and paste the page address.
  2. In the Navigator, pick the table that holds the prices and click Transform Data.
  3. Set the price column to Decimal Number type and remove any header or footer rows.
  4. Click Close and Load, then read each price in the sheet against the same row on the web page.
  5. Use Data, Refresh All to update the table, and check the prices again after each refresh.

Worked example: Fictional share prices, 27 November 2026

The practice table below is a fictional five-share price list. The price column is the closing price, and the total is their sum. The table below is fictional practice material, with fictional values. It is the expected result, worked out by hand, not a run of any tool.

Share Price
Alpha Foods 12.40
Beta Energy 8.75
Gamma Retail 21.30
Delta Bank 15.60
Epsilon Health 9.85
Total 67.90

Expected result. Five shares, each price matches the page, and the prices add to 67.90. UNTESTED: no web page was imported for this guide; the table shows the expected values to check an import against.

Limits

  • A page that needs a login cannot be imported this way, so use an export from the site instead.
  • Web tables change layout without notice, so a refresh can break the query and needs re-checking.

Sources

See all