Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Power Query Web: How to Pull Web Data into Excel

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Power Query's "From Web" connector lets you pull data from a web page straight into Excel (or Power BI) without copy-pasting. You give it a URL, it scans the page for tables and other structured content, you pick what you want, and it builds a refreshable query. If the page changes later, one click refreshes your data. This works in Excel for Windows and Mac and in Power BI Desktop; menu labels can differ slightly by version.

What You'll Need

  • Excel 2016 or later (Power Query is built in; in Excel 2010/2013 it was a free add-in called Power Query), or Power BI Desktop
  • The URL of a public web page that contains tables or structured data
  • An internet connection; if the page requires a login, your credentials for it

Step-by-Step

  1. Open Excel with a blank workbook. Go to the Data tab and choose Get Data > From Other Sources > From Web (in Power BI Desktop: Home > Get Data > Web).
  2. Paste the page URL into the box and click OK. Use the full address including https:// — the connector can't search for you.
  3. If the page needs authentication, Excel shows a credentials prompt. Choose the appropriate option — Anonymous for public pages, Basic or Organizational account where applicable — and sign in. Never enter credentials for a site you don't trust.
  4. The Navigator window opens, listing what Power Query found on the page. Look for items labelled Table or Table View; click each one to see a preview on the right.
  5. Tick the table(s) you want. If you select more than one, Excel creates a query for each. Click Transform Data rather than Load — you almost always want to clean the data first.
  6. The Power Query Editor opens. Common clean-ups: remove top rows that are really headers (Home > Remove Rows > Remove Top Rows, then Use First Row as Headers), set column types using the icon in each column header (ABC/123 icons), rename columns by double-clicking them, and filter or sort with the dropdown arrows.
  7. When it looks right, click Home > Close & Load (or Close & Load To to choose a worksheet location or load only as a connection).
  8. The data lands in your sheet as a table. To refresh it later with the latest page data, click anywhere in the table, then Data > Refresh All, or right-click the table and choose Refresh.

Common Mistakes

  • Using the plain copy of the URL without https:// — the connector needs the full address.
  • Choosing Load immediately instead of Transform Data, then wrestling with messy headers and wrong column types in the sheet. Fix those in the editor.
  • Ignoring column data types. If Power Query guesses "Any" or text for numbers, sums and dates break downstream.
  • Expecting it to grab anything visible on a page. Power Query reads tables, lists and structured data in the page's HTML — text scattered loosely across the page often isn't detected as a table.
  • Trying to scrape pages that build their content dynamically with JavaScript (endless-scroll feeds, apps). The connector sees the initial HTML only, so tables that appear only after scrolling or clicking may be missing.
  • Forgetting that the site's terms may restrict automated access. Check that scraping the page is allowed, and don't hammer a site with constant refreshes.

Tips

  • If Navigator shows no tables, click Web View in the window to see the page as Power Query sees it, then use Add Table Using Examples: type a couple of example values and Power Query infers the extraction.
  • For APIs returning JSON, use the same From Web connector; in the editor, expand the Json.Document records by clicking the expand icons in column headers.
  • Combine multiple similar pages (e.g., one table per category) by turning your query into a function or by using Data > Get Data > From Folder / Combine Queries patterns — a bit more advanced but very powerful.
  • To edit the query later, Data > Queries & Connections, then double-click the query to reopen the editor.
  • Set refresh behaviour under Data > Queries & Connections > Properties, where you can enable refresh when the file opens or on a timed interval.

Troubleshooting

Navigator shows no tables: the page likely renders data with JavaScript or uses complex layouts. Try Add Table Using Examples, look for an official API or data export the site offers, or pick a different source page.

"Access is denied" or login errors: open Data > Get Data > Data Source Settings, select the URL, and click Edit Permissions > Credentials > Edit to re-enter or clear the saved credentials, then refresh.

Data looks shifted or headers are wrong: open the editor and adjust Remove Top Rows and Use First Row as Headers. Column headers being read as data is the most common import glitch.

Refresh fails after the page changes: if the site redesigned its page, the query can't find the old table structure. Reopen the editor; if the source step errors, rebuild the query from the new page and copy over your transformation steps where possible.

Errors in individual cells: click Keep Errors or Remove Errors in the Home ribbon to handle them, or fix the column type that's causing conversion failures.

Refresh asks for credentials every time: at the credentials prompt, pick the correct authentication level (usually the root of the domain) so the saved login applies to all pages on that site.

Frequently Asked Questions

Does Power Query From Web work on Excel for Mac?

Yes. Modern Excel for Mac includes Power Query with a From Web option on the Data tab, though the ribbon looks slightly different from Windows and some advanced connectors are unavailable.

Can it scrape any website?

No. It works best on static pages with proper HTML tables. Heavily scripted pages, login-walled apps and infinite-scroll feeds usually can't be read directly; look for an official API or export instead.

Is Power Query free?

Yes — it's built into Excel 2016 and later and into the free Power BI Desktop, with no add-in purchase needed.

Will the query update automatically?

Not by default. You refresh manually or enable refresh-on-open in the query properties. Be considerate with automatic refresh intervals — sites may block frequent requests.

Can I pull data from multiple URLs into one table?

Yes. A common approach is a worksheet listing the URLs, turning the query into a function and invoking it per row, then appending the results. It's an intermediate technique, but well documented in Microsoft's Power Query guidance.