sodcalculator

10 Tech How-To

Import Data From the Web Into Microsoft Excel

Guide 10-41007 · Updated · Step by step

Importing data from a website into Microsoft Excel lets you analyze tables, lists, and other structured information without copying each value by hand. You can connect to a web page with Excel’s Power Query tools, choose the data to load, and refresh the connection later when the source changes. You’ll need an internet connection and a desktop version of Excel with the Get Data tools; the exact labels can vary slightly by platform and version.

What You’ll Need

  • Microsoft Excel with the Data tab and Get Data or Get & Transform Data tools. These features are available in current desktop versions of Excel, though availability and menu labels can differ on Mac and in older releases.
  • The web address of a page or file that you’re permitted to access. A public page is easiest; sites that require a sign-in may need an approved authentication method.
  • A stable internet connection and, if prompted, the credentials or access permissions required by the source.

Step-by-Step

  1. Check the source page. Open the address in a browser and look for the information you want. A clearly structured HTML table is usually the simplest source. Make sure the page is available to you and that you are allowed to reuse its data. If the information is offered as a downloadable CSV or Excel file, importing that file may be more reliable than importing the page itself.
  2. Start a web import. In Excel, open the workbook where you want the data. Select the Data tab, then choose Get Data > From Other Sources > From Web. In some versions, the route is Data > From Web, or the command appears under Get & Transform Data. If you cannot find it, use Excel’s command search or check whether your version supports Power Query.
  3. Enter the URL. Paste the web address of the page or file into the URL field and select OK or Connect. Use the direct page address rather than a search-results link. If Excel asks how to connect, select the appropriate authentication method. For a public page, choose the anonymous option if it is offered. Do not enter a password into a prompt unless you recognize the sign-in and have permission to use it.
  4. Choose a table in Navigator. Excel may show a Navigator window with items such as Table 0, named tables, or page sections. Select each candidate to preview it. Look for the columns and rows you need, and check that the preview contains the actual data rather than page navigation, advertisements, or unrelated text. If the right content is not listed, try another item or use the Power Query editor to inspect the available data.
  5. Review and clean the data. Select Transform Data to open the Power Query editor before loading. Check the column headers, remove irrelevant columns or rows, and confirm that values have sensible data types. Dates, numbers, and text can be interpreted incorrectly when a site uses a different regional format. Use the type icon in a column header to change a column’s type; if needed, choose a locale when converting dates or numbers. Remove repeated header rows or blank rows if they appear in the imported results.
  6. Load the result. When the preview is ready, choose Close & Load to put the data into a worksheet. To choose where it goes, use the arrow beside that command and select Close & Load To, then choose a table, an existing worksheet location, or another available destination. Avoid selecting a cell inside data you need to keep, because the imported table could overwrite it.
  7. Check the worksheet. Confirm that the expected headings, records, and values arrived. Look for missing rows, shifted columns, unexpected blanks, or numbers stored as text. If the table is correct, save the workbook. Excel usually keeps the query as a connection, so you can update the imported data later using Data > Refresh All, or by right-clicking the query table and choosing Refresh.

Common Mistakes

  • Using the wrong URL: A page that redirects, requires a session, or changes address after sign-in may not import correctly. Start with the direct page or data-file address.
  • Loading the wrong item: Navigator can list several tables with similar names. Preview each one before loading.
  • Assuming a page is a table: Some sites display data dynamically, so the browser can show information that Power Query does not receive as a simple table. A CSV download or the site’s permitted data export may work better.
  • Ignoring data types: A date treated as text will not sort or calculate like a date. Review types in the editor before loading.
  • Expecting refresh to fix every change: Refresh updates a query from its source; it does not guarantee that a redesigned page will still have the same table structure.

Tips

  • Import only the columns and rows you need. A smaller query is easier to review and maintain.
  • Give the query and worksheet table clear names so you can identify them later. In Excel, query management is available through Data > Queries & Connections in many desktop versions.
  • After importing, test Refresh while online to confirm Excel can still reach the source. Check the refreshed results before relying on them.
  • If you need repeatable analysis, keep the source data in a separate query table and build formulas or reports in another worksheet. This reduces the chance that a refresh will replace your work.
  • For a file that changes location or needs credentials, review the query’s source and permissions rather than sharing a workbook that contains sensitive access details.

Troubleshooting

  • “From Web” is missing: Check the Data tab for Get Data or Get & Transform Data. Menu placement depends on Excel version and operating system. Some older or web-based editions have fewer Power Query features; try a supported desktop edition or download the source file and import it through Data > From Text/CSV if available.
  • Excel cannot connect: Confirm the URL opens in your browser, check your internet connection, and try the page’s main address rather than a temporary or redirected link. A firewall, proxy, or site restriction may also block access.
  • The page asks for authentication or keeps failing: In the connection prompt, choose the method the site supports. If the page uses a sign-in or interactive verification that Excel cannot handle, use an authorized downloadable export or ask the site administrator about an approved data-access method. Do not try to bypass access controls.
  • The preview is empty or incomplete: The site may load its data dynamically or may have changed its layout. Try another table in Navigator, inspect the page’s available download options, or import a published CSV instead.
  • Dates, decimals, or leading zeros are wrong: Return to Transform Data, select the affected column, and set the correct data type. Use a suitable locale for dates and decimal separators. Keep identifiers such as postal codes as text when leading zeros matter.
  • Refresh produces an error: Open Queries & Connections and inspect the query’s error details. Check whether the source URL or page structure changed, whether credentials expired, and whether the source remains accessible.

Frequently Asked Questions

Can Excel import data from any website?
No. Excel can import many accessible web tables and files, but dynamic pages, sign-in requirements, and site restrictions can prevent a direct import.

Will the imported data update automatically?
Usually, you can refresh the query manually with Refresh or Refresh All. Automatic refresh options may be available in query or connection properties, but they depend on the Excel version and source.

Can I import a website table in Excel for the web?
Features vary. If the web version does not offer the required web connector, create or edit the query in a supported desktop version, then open the workbook online.

How do I import a web page that has several tables?
Choose From Web, then inspect the entries in Navigator. Select each candidate to preview it and load the table that matches the information you need.

Can I import data from a page that requires a password?
Sometimes, if the site’s authentication method is supported and you are authorized to access the data. If Excel cannot connect, use an approved export or request guidance from the site administrator.

Why do some values appear differently after import?
Power Query may infer a data type or regional format that differs from the source. Review the column types and locale in the editor, then load the corrected data.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →