How to turn a web table into an Excel Pivot Table
Updated November 9, 2026
A PivotTable is the fastest way to summarize a table you pulled off a website: totals by region, counts by status, averages by category. The hard part is usually getting a clean grid into Excel first. This guide covers getting the table in, fixing common paste problems, and building the PivotTable.
1. Get the web table into Excel
Pick the method that matches the page:
- Copy and paste: select the table on the page, copy it, click cell A1 in Excel and paste. Use Paste Special → Text if web formatting gets in the way. Best for small, public tables.
- Data → From Web (Power Query): paste the page address, pick the table in the Navigator, then Load. Good for public pages you want to refresh later. It often misses tables behind a login or tables built by JavaScript after the page loads.
- A browser extension: for logged-in reports, dashboards and JavaScript grids. TableToSheet lists every table and data grid on the page you're viewing and downloads the one you pick as Excel (.xlsx) or CSV. It runs on your device; table data isn't sent anywhere.
Need more detail on each export option? See how to export a web table to Excel or CSV.
2. Clean the columns before you pivot
PivotTables need real numbers and one header row. Fix these before you insert one:
- Numbers stored as text (currency symbols, thousands separators, or accounting-style negatives in parentheses): select the column, then Data → Text to Columns → Finish, or use a helper column that multiplies by 1. An extension that converts formatted values into plain numbers saves this step.
- Repeated header rows from paginated tables: turn on a filter and delete the extras so only the top row is a header.
- Blank or merged header cells: give every column a unique name. PivotTables refuse duplicate or empty headers.
- Dates as text: convert with Data → Text to Columns or
=DATEVALUE(A2)so you can group by month later. - Extra spaces:
=TRIM(A2)in a helper column, then paste values over the original.
3. Turn the range into an Excel Table
- Click any cell inside the cleaned grid.
- Choose Insert → Table (or press
Ctrl+T/⌘T) and confirm that the range has headers. - Optional but useful: name the table under Table Design → Table Name (for example
WebData) so the PivotTable source is easy to spot later.
Tables expand when you paste new rows at the bottom, which makes refreshing the PivotTable simpler.
4. Build the PivotTable
- With a cell in the table selected, choose Insert → PivotTable.
- Confirm the table name as the source and choose a new worksheet for the result.
- In the PivotTable Fields pane, drag fields into place:
- Rows: the category you want to group by (Region, Status, Product, and so on)
- Columns: a second grouping if you need a matrix (for example Month)
- Values: the number to total, count or average
- Filters: any field you want to slice by without putting it in the grid
- Click the value field's drop-down to switch between Sum, Count, Average and other summaries.
5. Useful PivotTable moves for web data
- Group dates by month or year: right-click a date in the Row or Column area → Group → Months / Years.
- Show percentages: right-click a value → Show Values As → % of Grand Total (or % of Row / Column).
- Sort by total: click a value cell and use the sort buttons so the largest categories rise to the top.
- Filter out noise: use the row label filter to hide blank or "Other" rows that came from footnotes on the web page.
6. Refresh when the website changes
- If you used From Web / Power Query: Data → Refresh All pulls the latest HTML table, then refresh the PivotTable.
- If you pasted or used an extension: export the table again, paste or append into the Excel Table (new rows go just under the last data row), fill any helper columns, then right-click the PivotTable → Refresh.
Which export path fits a PivotTable?
- One-off summary of a public page: copy and paste, clean, then pivot.
- A public table you revisit: From Web so Refresh All updates both the data and the PivotTable.
- Logged-in pages, JavaScript tables, or messy formatting: export with an extension so columns and numbers arrive clean enough to pivot without much cleanup.
Using Google Sheets instead of Excel? Start with how to copy a table from a website into Google Sheets, then insert a Pivot table from the Data menu. Need transactions from a PDF bank statement rather than a web page? See bank statement PDF to Excel.