LightCube Data Extractor

How to Extract Table Data from Website to CSV or Excel

By the LightCube Data team ยท Updated 2026-11-27

To extract table data from website pages, copy the table into a spreadsheet, link the spreadsheet to the page URL, or use a browser extension that converts HTML tables into CSV, Excel, or Google Sheets files. Each method suits different needs, so the best choice depends on how often the data changes and how much control you need.

TL;DR: - Copy and paste works for small tables, but formatting often breaks, so paste without formatting or use an external data link instead. - In LibreOffice, OpenOffice, or Excel, use the external data link command, paste the page URL, and pick the specific HTML table you need. - Browser extensions and web tools are faster for one-off exports to CSV, Excel, or Google Sheets, and they handle pages with several tables more easily.

Why does copying a web table into a spreadsheet break the formatting?

When you select a table on a web page and copy it, the clipboard carries HTML and styling along with the values, not just plain text. Pasting that into LibreOffice, OpenOffice, or Excel often produces misaligned columns, odd column widths, or stray content from the surrounding page. The usual fix is to paste without formatting (Command+Shift+V on macOS, Ctrl+Shift+V on Windows) and then rebuild the layout. Even then, merged cells, fixed-width columns, and hidden helper rows can survive in awkward ways. If the table is large or you plan to refresh it later, undo the paste and use a method that reads the table structure directly from the page.

How do you extract table data from website pages with a spreadsheet's external data link?

LibreOffice and OpenOffice both have a command called Link to External Data under the Insert menu. Excel has a comparable feature for pulling data from a web page, usually found under the Data tab. Both approaches tell the spreadsheet to fetch the page itself, find the tables, and pull the values into cells.

  1. Open the web page in your browser and locate the table you need.
  2. Copy the full page URL from the address bar.
  3. In your spreadsheet, choose Insert > Link to External Data, or the equivalent web data command in Excel.
  4. Paste the URL into the dialog and press Enter or Return.
  5. Wait while the spreadsheet loads the page and scans it for tables.
  6. If a language prompt appears, leave the setting on Automatic and click OK.
  7. Choose the table you want from the list, for example HTML_1, then click OK.
  8. Review the imported cells, fix any formatting issues, and save the file as CSV or Excel.

What do the HTML table options mean when the import dialog appears?

The dialog lists what the spreadsheet found on the page. "All" imports the entire contents of the page, including headings, paragraphs, and navigation, which is rarely useful for analysis. "Tables" imports every table on the page, stacked in the order they appear. The numbered entries such as HTML_1, HTML_2, and HTML_3 refer to individual tables. HTML_1 is the first table in the page, HTML_2 is the second, and so on. Some pages also contain layout tables used for positioning, and those can appear in the list too, so the numbering does not always match the visible data tables. Open the page in a separate tab and count the tables from top to bottom before you choose.

How do you pick the right table when a page contains several?

Consider a Wikipedia page about radio stations in Canada. It shows a table of campus radio stations, a separate table of internet radio stations, and a couple of small layout tables used to arrange the page. The import dialog shows four entries plus "All" and "Tables". If the internet radio station table is the second visible table, select the second numbered entry. The spreadsheet then pulls only that table into the sheet and leaves the other tables behind. Take a moment to compare the imported headers with the page, since a wrong choice usually shows up as a column you did not expect.

What should you do when imported values or characters look wrong?

Imported tables can carry small formatting quirks. A common example is accented or non-English characters that do not convert cleanly, such as French letters appearing as replacement symbols. These can usually be corrected by hand or by re-importing with the correct language setting instead of Automatic. Other checks worth making: numbers that arrived as text and will not total correctly, dates in an unexpected format, blank rows left over from the page layout, and links that came across as clickable text. Spend a few minutes on these checks before you build formulas or charts on top of the data.

How do browser extensions and web tools compare with spreadsheet imports?

Method Best for Output Refresh Main limitation
Copy and paste One small table, one time Whatever your spreadsheet saves Manual Formatting often breaks
External data link Repeatable pulls from a known page CSV, Excel, Google Sheets Can be scheduled Page changes can break the link
Browser extension Fast selection of one table on screen CSV, Excel, Google Sheets Manual You must be on the page
Web tool Sharing a conversion link with others CSV, Excel, Google Sheets Manual Limited to what the page exposes publicly

If you want a guided route without hunting through menus, LightCube Data offers a browser extension and a web tool for pulling HTML tables into CSV, Excel, or Google Sheets. The extension suits people who work across many sites, since you select the table on the page and export it. When you do not want to install anything, the LightCube Data web tool lets you work from a page URL directly in the browser. Both are quicker than rebuilding a spreadsheet import each time.

Can you refresh imported table data automatically?

Yes, depending on the application. A spreadsheet that links to external data can be set to check the source on a regular basis, or when the file is opened, and update the cells when the page changes. That is useful for reference tables such as price lists, rankings, or listings that you check regularly. Keep in mind that a refresh depends on the page keeping the same structure. If the site redesigns the table or changes the URL, the link can fail or pull the wrong section, so keep a manual copy of important extracts and check the first refresh carefully.

Export any web table to CSV or Excel

Paste a page link into the LightCube web exporter and download its tables as CSV or Excel. Free for 25 rows; Pro is $9 once.

Try the web exporter ↗

FAQ

Does copying and pasting a table from a website give clean data?

Usually not. The clipboard carries the page's styling along with the values, so columns can be misaligned or merged. Paste without formatting and clean up the result, or use an external data link or extraction tool instead.

What is the difference between "All", "Tables", and "HTML_1" in the import dialog?

"All" imports the whole page, "Tables" imports every table on the page, and the numbered entries such as HTML_1 refer to one table each, in page order. Choose the numbered entry that matches the table you want.

Can I extract a table from a page that requires a login?

It depends on the tool. Spreadsheet imports and web tools fetch the page as an outside visitor, so they usually see only what is public. A browser extension can work when you are logged in because it reads the page already open in your tab.

How do I get the extracted table into Google Sheets?

Export the table as a CSV file, then open it in Google Sheets with File > Import. You can also paste the values directly into a sheet, or use a Sheets import function that pulls from a published URL.

Will an external data link update automatically if the website changes?

It can, if you set a refresh schedule in the spreadsheet. The link only updates cleanly while the page keeps the same table structure and URL, so verify the first refresh and keep a backup copy.


Based on a video by Robobunnyattack!: How to extract tabular data from a web page into LibreOffice using "Link to External Data". Written in our own words with added steps and an FAQ.

More guides