Combine Tables from Multiple Web Pages with Excel Power Query
Question details
Combine tables from multiple web pages into one Excel query.

- Product
- Microsoft Excel Power Query
- Device & OS
- not provided
- Scenario
- The user wants to retrieve tables from several URLs on the same website and combine them in Excel.
- Observed behavior
- Individual web pages can be imported, but their tables need to be combined into a single result.
Collect the page URLs and check that the tables have compatible columns. Verify that your Excel version supports the From Web connector; availability can vary by platform and version.
Use a custom Power Query function for multiple URLs
Use this approach when you have several pages with similarly structured tables and want to manage the URLs in one query.
In Excel, open Data > Get Data > From Other Sources > Blank Query. In Power Query Editor, select Home > Advanced Editor and enter: (url as text) as table => Web.Page(Web.Contents(url)). Name the query GetWebTables.
Create another Blank Query and open Advanced Editor. Enter: let Source = Table.FromList({"https://example.com/page1", "https://example.com/page2"}, Splitter.SplitByNothing(), {"URL"}) in Source. Replace the example URLs with your page URLs.
With the URL query selected, choose Add Column > Invoke Custom Function. Select GetWebTables, map its url parameter to the URL column, and select OK.
Use the expand button on the new function column to show the Data column and any available identifiers. Inspect the rows and filter to the desired table for each URL, then expand the Data column to select and combine the table fields.
Check the combined columns and data types in Power Query Editor, then select Home > Close & Load to load the result into Excel.

Append separate From Web queries
Use this simpler approach for a small number of pages when you prefer to select each table individually.
Work with Combined Excel Tables in WPS Spreadsheets
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface. Open compatible Excel files to review and edit combined tables as you move between office suites. WPS does not fix Excel Power Query web connections or replace the Power Query workflow described above.

Frequently Asked Questions
Can I add more URLs to the custom function query?
Yes. Open the URL query in Power Query Editor, select Home > Advanced Editor, and add URLs to the list. Refresh the query to invoke the function for the updated list.
What if each web page contains several tables?
Expand the custom function results to inspect the Data column and available identifiers. Filter the rows to the table you need from each page before expanding Data.
Why do appended tables have extra or empty columns?
Append matches columns by name. In Power Query Editor, rename corresponding columns and align their data types before using Home > Append Queries.
Can I use the From Web connector in Excel for Mac?
Support varies by Excel version and platform. Check the Data > Get Data menu and Microsoft's current documentation for your Excel for Mac version before relying on the connector.
How do I update the combined data later?
In Excel, select Data > Refresh All. Power Query will attempt to retrieve the pages again; refresh can fail if a URL, access requirement, or page structure has changed.




