ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Productivity
  3. How to Import Data From a Website Into Excel

How to Import Data From a Website Into Excel

By ExcelReady Team·Updated November 3, 2026·6 min read

The short answer

To import data from a website into Excel on Windows, go to Data > From Web, paste the page address and click OK. In the Navigator, pick the table and click Load, or Transform Data to clean it first. You can refresh it later. If From Web can't see the data, paste it and clean it with TRIM and VALUE.

Key takeaways

  • Data > From Web (Power Query) imports HTML tables from a web page into an Excel table you can refresh.
  • Click Transform Data instead of Load to remove columns, fix types and filter rows before the data lands.
  • Refresh with Data > Refresh All (Ctrl+Alt+F5 on Windows) or set the query to refresh on a schedule.
  • Pasted web numbers are often text with extra spaces. VALUE(TRIM(cell)) turns them back into numbers.
  • From Web reads tables in the page's HTML. Data drawn later by scripts or behind a login may not appear.
On this page+
  1. The quick answer: Data > From Web
  2. How to import a table from a website, step by step
  3. Transform the data before you load it
  4. Refresh the data automatically
  5. When From Web can't see the data
  6. Clean pasted web data with TRIM and VALUE
  7. Practise it

To import data from a website into Excel, use Data > From Web: paste the page address, pick the table and load it. Excel keeps a link to the page, so you can refresh the data later instead of copying it again. This guide is for anyone who tracks prices, rates, schedules or published statistics from the web, and it also covers what to do when From Web can't reach the data.

The quick answer: Data > From Web#

From Web is part of Power Query, Excel's tool for getting and cleaning data (on the ribbon it appears as Get & Transform Data). It reads the tables in a web page and loads the one you choose into your workbook.

Excel versionWhere to find it
Microsoft 365, Excel 2024, 2021, 2019 (Windows)Data > From Web in the Get & Transform Data group
Excel 2016 (Windows)Data > New Query > From Other Sources > From Web
Excel 2010 and 2013 (Windows)The separate Power Query add-in
Excel for Mac and Excel for the webFewer Power Query sources; From Web may not be listed

If you're new to Power Query, Power Query for beginners explains the editor and its steps.

How to import a table from a website, step by step#

Here is the full process on Windows:

  1. Copy the address of the page from your browser, for example https://example.com/prices.
  2. In Excel, go to Data > From Web.
  3. Paste the address into the URL box and click OK.
  4. If Excel asks how to connect, choose Anonymous for a public page and click Connect.
  5. The Navigator window lists the tables it found, named Table 1, Table 2 and so on. Click each one to preview it. The Web View tab shows the page itself, which helps you spot the right table.
  6. Tick the table you want and click Load.

Excel adds a new sheet with the data as a formatted Excel table, and the query appears in the Queries & Connections pane. You can now sort it, chart it or point formulas at it. To show only some rows, use the filter buttons on the header row; the filter lesson covers them, including totals with SUBTOTAL.

Check the site's terms of use before you import from it regularly, and don't set a very short refresh interval on someone else's server.

Transform the data before you load it#

Click Transform Data instead of Load to clean the table in the Power Query Editor first. The common fixes for web tables are:

  • Remove columns you don't need: select them and press Delete.
  • Remove header or footer rows: Home > Remove Rows > Remove Top Rows.
  • Fix data types: click the icon on a column header and pick Whole Number, Decimal Number or Date. Web tables often arrive as text.
  • Trim and clean text: Transform > Format > Trim removes spaces at the ends.

Click Close & Load when you're done. Power Query records each step and repeats it on every refresh, so you only clean once. For when to use Power Query and when formulas are enough, see Power Query vs formulas.

Refresh the data automatically#

A web query is a live connection, so you can update it at any time:

  • Refresh everything: Data > Refresh All, or Ctrl+Alt+F5 on Windows.
  • Refresh one table: right-click inside it and choose Refresh.
  • Refresh on a schedule: in Queries & Connections, right-click the query, choose Properties, and tick Refresh every with a number of minutes, or Refresh data when opening the file.

Formulas that point at the loaded table update with it. If the website changes its layout, the query may break; open it with Edit and adjust the step that fails.

When From Web can't see the data#

From Web reads the tables in the page's HTML. It struggles in three situations:

  1. Data drawn by scripts. Many modern pages load their tables after the page opens. Navigator may show no tables or only empty ones.
  2. Pages behind a login. Excel can't use the session from your browser.
  3. Data that isn't a table, such as cards or lists laid out with styling.

Try these alternatives, in order:

  • Look for a download link. Many sites offer CSV or Excel downloads, which are cleaner than any web table. See how to import a CSV file into Excel.
  • Use the site's data feed. If the site offers an API that returns JSON, paste that address into From Web. Power Query turns the JSON into a table you can expand.
  • Copy and paste. Select the table in your browser, copy it, and paste it into Excel. Right-click and choose Match Destination Formatting to drop the web styles.

Clean pasted web data with TRIM and VALUE#

Pasted web data often looks fine but doesn't calculate. Numbers arrive as text, usually with extra spaces, so SUM returns 0. Here are four prices pasted from a page (the quotes show where the extra spaces are):

AB
1ProductPrice (pasted)
2Notebook" 12.50 "
3Pen set"8.75 "
4Desk lamp" 21.00"
5Stapler"4.25"

Fix one cell with TRIM and VALUE:

Excel formula
=VALUE(TRIM(B2))

TRIM removes the spaces at the ends and turns double spaces inside into single ones, and VALUE turns the text "12.50" into the number 12.5. To total the whole column in one step:

Excel formula
=SUMPRODUCT(VALUE(TRIM(B2:B5)))

The result is 46.5. The TRIM function guide and the VALUE function guide cover both in detail.

Web pages also use the non-breaking space, character 160, which TRIM does not remove. If VALUE still returns #VALUE!, replace it first:

Excel formula
=VALUE(TRIM(SUBSTITUTE(B2,CHAR(160)," ")))

For more causes and fixes, read why numbers are stored as text and how to clean messy data in Excel.

Practise it#

Getting the data in is half the job; cleaning it is the part employers test. Practise cleaning messy text in a live spreadsheet: you'll use TRIM, PROPER and SUBSTITUTE, and each formula is checked instantly. Then practise filtering a table, or total the pasted prices in the exercise on this page.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

These prices were pasted from a web page as text with extra spaces, so =SUM(B2:B5) returns 0. Click D2 and total them with =SUMPRODUCT(VALUE(TRIM(B2:B5))).

fx
ABCDE
1
Product
Price (pasted)
2
Notebook
12.50
Total
3
Pen set
8.75
4
Desk lamp
21.00
5
Stapler
4.25
6
7
8

Tip: TRIM removes the spaces, VALUE turns each text price into a number, and SUMPRODUCT adds them up. The answer is 46.5.

Practise this in a lesson

LessonCleaning messy textFix stray spaces, random capitals and inconsistent separators in imported data with TRIM, PROPER, UPPER, LOWER and SUBSTITUTE.LessonFilter a tableTurn on filter buttons with Ctrl+Shift+L, filter by one or several values and by a number condition, total and count only the visible rows with SUBTOTAL, then clear the filters.Function guideTRIMClean imported data with Excel's TRIM: strip leading, trailing and double spaces so lookups and counts work. Examples and live practice.Function guideVALUEFix numbers stored as text with Excel's VALUE function, so SUM and lookups work again. Examples, common mistakes and a live practice exercise.

Frequently asked questions

How do I pull data from a website into Excel automatically?

+

Use Data > From Web to create a query, then open the query's properties and turn on Refresh every so many minutes or Refresh data when opening the file. Excel then reloads the table without any copying.

Why does Excel From Web not show the table I see in my browser?

+

Many pages build their tables with scripts after the page loads, or show data only after you sign in. From Web reads the page's HTML, so that data may not be there. Look for a download or CSV link instead.

Is From Web available in Excel for Mac?

+

Power Query on Mac and in Excel for the web supports fewer data sources than Excel for Windows. If From Web is not on your Data tab, copy and paste the table or download a CSV file.

Why are numbers copied from a website not adding up?

+

They were pasted as text, often with extra spaces or non-breaking spaces. Use =VALUE(TRIM(A2)) to convert them, and SUBSTITUTE(A2,CHAR(160),"") to remove non-breaking spaces first.

Sources

  • TRIM function - Microsoft Support
  • VALUE function - Microsoft Support
  • Convert numbers stored as text to numbers - Microsoft Support

Written and checked by the ExcelReady Team. First published November 3, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. The quick answer: Data > From Web
  2. How to import a table from a website, step by step
  3. Transform the data before you load it
  4. Refresh the data automatically
  5. When From Web can't see the data
  6. Clean pasted web data with TRIM and VALUE
  7. Practise it

Keep reading

Productivity· 6 min read

Power Query in Excel for Beginners: What It Does

Power Query is Excel's built-in tool for importing and cleaning data. You load data from a table, file or folder, fix it with commands such as Trim, Split Column and Remove Duplicates, and Excel records each step. Click Refresh and every step runs again on new data. Find it on the Data tab, under Get & Transform Data.

Productivity· 5 min read

How to Import a CSV File Into Excel Without Breaking It

To import a CSV into Excel safely, don't double-click the file. Go to Data > From Text/CSV, pick the file, check the File Origin (choose UTF-8) and the delimiter, then click Transform Data and set ID, ZIP and phone columns to Text before you click Close & Load. This keeps leading zeros, long numbers and dates intact.

Text· 7 min read

Clean Messy Data in Excel With TRIM, CLEAN and PROPER

Use TRIM to remove extra spaces, CLEAN to remove hidden non-printing characters, and PROPER to put a capital at the start of each word. Nest them to fix several problems at once: =PROPER(TRIM(A2)) turns " maria gonzalez" into "Maria Gonzalez". Build the clean version in a new column, check it, then paste it as values.

More on productivity

  • Shortcut to Insert Today's Date and Time in Excel
  • How to Insert Multiple Rows in Excel at Once
  • Excel Keyboard Shortcuts Cheat Sheet for Windows and Mac
  • How to Link an Excel Chart or Table to PowerPoint
  • Excel Macros for Beginners: Record Your First Macro
  • How to Mail Merge From Excel to Word, Step by Step
All productivity articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free