Extract tables from a website into clean, sortable sheets
Copying a table from a web page into Excel usually brings merged cells, footnote markers and numbers stored as text. Paste this to-do and your todo.is agent reads the page, finds each table, fixes headers and number formats, and gives you one Excel sheet per table with a link back to the source.
The prompt
- Extract the tables from [PAGE LINK]. I need [WHICH TABLES]. Put each table on its own sheet in one Excel file, named after the table caption or the heading above it. Keep the original column headers, flatten multi-row headers into one row, and remove footnote markers (small numbers or asterisks) from the values (list the footnotes under the table instead). Convert numbers, percentages and dates so Excel treats them as numbers, and keep units in the header, e.g. "Population (millions)". Add a first sheet called "Sources" with the page link, the date you read it and a one-line description of each table. Save it as [FILE NAME].xlsx. If a table is an image, read it with OCR and mark it as OCR.
What to change
- [PAGE LINK]: A public page with tables, e.g. a Wikipedia article, a statistics page or a sports results page.
- [WHICH TABLES]: e.g. "all tables", "only the table under Results by year" or "the 2nd and 3rd tables".
- [FILE NAME]: e.g. "EU_Rail_Stats". Your agent adds .xlsx. Ask for CSV files instead if you prefer.
Example result
- EU_Rail_Stats.xlsx
- Sheet: Sources
- • Page: a public encyclopedia article on rail transport in Europe
- • Read on: Oct 8
- • Table 1, "Network length by country": 27 rows, 4 columns
- • Table 2, "Passenger-km by year": 12 rows, 6 columns
- • Table 3, "High-speed lines": 15 rows, 5 columns
- • Table 4, "Busiest stations": 10 rows, 3 columns
- Sheet: Network length by country (first rows)
- • Country: Germany · Network length (km): 33,400 · Electrified (%): 61 · Gauge: Standard
- • Country: France · Network length (km): 27,500 · Electrified (%): 60 · Gauge: Standard
- • Country: Spain · Network length (km): 15,900 · Electrified (%): 64 · Gauge: Mixed
- What was cleaned
- • The header "Length / km / (2022)" spread across two rows became "Network length (km)"
- • Values like "33,400[3]" became the number 33400, and note [3] is listed under the table
- • "61 %" became 0.61 formatted as a percentage, so you can chart it
- • A "Total" row at the bottom was kept but moved to the end and marked in bold
- Footnotes (Table 1)
- • [3] Includes some private lines
- • [7] Figure from an earlier year
- Checks
- • Row counts match the page for all 4 tables
- • No table was an image, so no OCR was needed
- The numbers above are illustrative of the format. Always check key values against the source page before you use them.
How to do it with todo.is
- Copy the prompt, add the page link and say which tables you want.
- Paste it into todo.is, or message it to your agent on Slack or Telegram.
- Your agent reads the page in a browser and cleans each table as it copies it.
- Download the Excel file. Reply "also make a chart of table 2" or "send these as CSV" if you need more.
Tips for a better result
- If the page has many tables, name the one you want by the heading above it. It avoids grabbing navigation or sidebar tables.
- Ask for units in the header, not in the cells. Cells with "km" or "%" can't be added up.
- For a table spread over several pages (page 1, 2, 3...), say "follow the pagination and combine into one sheet".
- A screenshot or PDF of a table works too: attach it and your agent will read it.
extract tables from a website: FAQ
- How do I extract a table from a website into Excel? Give your agent the page link and say which table. It copies the table, fixes headers and number formats and sends you an .xlsx file with one sheet per table.
- Why do numbers come in as text when I copy a web table? Web tables often include spaces, thousand separators, footnote marks or units in the cell. Your agent strips those so Excel can treat the values as numbers.
- Can it extract a table that only appears after clicking or scrolling? Yes. Your agent works in a real browser, so it can click tabs, expand sections or scroll before reading the table.
- Can I extract tables from a PDF instead? Yes. Attach the PDF and ask for its tables in Excel. Scanned PDFs are read with OCR, so check the numbers.
JavaScript is required to use the todo.is app.