Early access by waitlist
Back to blog

How to export data from a website to CSV or XLSX

Maksim Norkin (opens in a new tab)Product

· 7 min read

Export data from a website you use, like orders or search results, to a CSV or XLSX file for your spreadsheet. Steps, fixes for what breaks, and a short FAQ.

Most sites you work in show you a list: a store's order history, the users in an admin panel, the results on a listing site. Far fewer let you take that list away as a file. Here is how to get it into a spreadsheet today with nothing to install, and how to fix the parts that usually go wrong.

First, look for the site's own export

An export the site gives you is cleaner than anything you can copy, so spend two minutes looking before you start.

  • Next to the list. Look for Export, Download, or a "⋯" menu above or beside it. Some sites only show the button after you select a row, or tick the box that selects every row.
  • In settings or reports. Account, billing and admin areas often have a Reports or Data section with a download, and some sites email you the file instead.
  • In the help pages. Search the site's help for "export" or "CSV". If the export comes only with a higher plan, that's worth knowing before you spend an afternoon copying.

Set the filters, date range and sort you want before you export, since most exports give you what the list shows. If you get a CSV and want XLSX, open it in your spreadsheet and save it in that format.

No export? Copy and paste it properly

  1. Get as much of the list on screen as you can. Apply your filters, pick the largest page size the site offers ("Show 100" or "Show all"), and switch to a list or table view instead of cards if the site has one.
  2. Select only the list. Click just before the first column heading, scroll to the last row, and Shift-click just after its last cell. Select all would also take the site's menus and footer.
  3. Paste into an empty sheet. A plain table usually lands one cell per cell. If it comes with the site's fonts, colours and pictures, undo and paste as plain text or values only (in many spreadsheets, Ctrl+Shift+V, or Cmd+Shift+V on a Mac). If one way of pasting breaks the rows, try the other.
  4. Count the rows. Compare the number of rows you pasted with the count the site shows. A mismatch usually means a page you missed or a row that split in two.

Fix what breaks

Lists laid out as cards

Cards paste as a single column, each card's details on lines one after another: name, price, status, name, price, status. If every card has the same number of lines, you can fold them back into rows. With four lines per card in column A, put this in B1, then fill it right to E and down until it runs out:

=INDEX($A:$A, (ROW()-1)*4 + COLUMN()-1)

Change the 4 to your number of lines (and fill across that many columns), then copy the new columns, paste them back as values only, and delete column A. If one card leaves out a line, say one with no phone number, every card after it shifts. Scan a column that should look the same all the way down, such as prices, to find where it went wrong.

Merged cells, split cells, and numbers that turn into text

  • A heading across several columns arrives as one merged cell. Unmerge it and type the label into each column, or sorting and filtering will misbehave.
  • A cell with two lines, such as an address, can become two rows. Pasting the other way (formatted rather than plain, or the reverse) often keeps it in one cell. Otherwise, find the half-empty rows and join them up by hand.
  • Prices with a currency sign or thousands separator may paste as text that won't add up. Use find and replace to remove the sign and the separator, then format the column as a number.
  • Dates and IDs. 03/04 can be read as March or April depending on your settings, and an order number like 00412 loses its zeros. Format those columns as plain text before you paste, and fix the dates once you know which way round the site writes them.

The order number or product name was a link on the site, and in your sheet it's only the words. For a handful of rows, right-click each link, choose Copy link address, and paste it into a column of its own.

For many rows, look at two or three of the links first. Most sites build an item's address from its ID, like shop.example/orders/1042. If yours does, rebuild every address from the ID column. With the IDs in column A, put this in a new column and fill it down:

="https://shop.example/orders/" & A2

Lists spread over several pages

  • Numbered pages: copy one page at a time and paste each below the last. Every paste repeats the column headings, so filter the first column for the heading text and delete those rows.
  • Lists that load more as you scroll: scroll to the end before you select. On very long lists the site may drop rows from the top as you go down, so if the first rows are missing from your paste, copy it in chunks instead.
  • Rows that move between pages: a list sorted by most recent can shift while you copy, so a row appears twice or not at all. Sort by something that won't change, such as date created, and remove duplicates on the ID column at the end.

Doing it again next week

A list you export once, you usually export again. Save yourself the second round of fixes:

  • Bookmark the filtered list. Many sites keep the filters and sort in the address, so the bookmark opens the same list next time.
  • Keep two tabs in the sheet. Paste into a Raw tab, and do the folding, link-building and cleanup in a Clean tab whose formulas point at Raw. Next week you replace what is in Raw and the Clean tab follows.
  • Write the steps down the first time: the page size, where to start the selection, which paste worked. Add a date column, or put the date in the file name, so you can tell this week's copy from last week's.

CSV or XLSX?

Choose CSV when the file is going into another site, a database or someone else's spreadsheet: it is plain text, one sheet, and opens anywhere. Choose XLSX when you want to keep several tabs, column formats or the formulas from the steps above, which a CSV drops.

What we're building

Tabless is a browser extension that builds what you ask for from the sites you allow; nothing is typed or submitted without your OK. It isn't open yet. This is one of the jobs we're building it for: asking for a list in plain words, such as "the orders on this page, with date, customer, total and a link to each", and getting it as a CSV or XLSX file, without the copying and pasting.

It's designed to read through the session your browser already has, so there are no API keys or passwords to hand over, and to ask before it reads each site. It's for lists you're entitled to see, for your own work, and the site's own rules still apply.

FAQ

How do I get a site's list into a spreadsheet when the site has no export?

Show as many rows as the site allows, select from the first heading to the last cell, and paste into an empty sheet, as plain text if the formatting comes with it. Then fix cards, links and repeated headings as described above, and save as CSV or XLSX.

Does this work on a list I can only see when I'm signed in?

Yes. Copying works on anything the page shows you. The site's own terms still apply to what you do with it, so check them before you share the file.

Why do my numbers or dates look wrong after pasting?

Your spreadsheet guesses what each cell is. A currency sign turns a price into text, a leading zero is dropped from an ID, and a date is read in your own day-and-month order. Format ID and date columns as plain text before pasting, and remove signs and separators from prices with find and replace.

Can Tabless do this for me?

Not yet. Tabless is in early access and isn't open to use. Join the waitlist, and we'll let you know when you can try Tabless.

Until then, the steps above will get the list into your spreadsheet.