DEV Community

Cover image for How to Copy a Table from Excel to the Web Without Rebuilding It
Olayiwola Akinnagbe
Olayiwola Akinnagbe

Posted on • Originally published at tablesmit.com

How to Copy a Table from Excel to the Web Without Rebuilding It

Copying a table from Excel to a web tool should be simple. In practice
it is usually one of three bad outcomes: you get tab-separated text
in a single cell, you get a screenshot that cannot be edited, or you
spend twenty minutes rebuilding the table row by row.

The reason most tools fail here is that they ignore how Excel writes
to the clipboard. When you copy a range of cells in Excel, the clipboard
holds two formats simultaneously: a formatted HTML version and a
tab-separated plain text version. Most web tools read only the plain text
and dump it into a single input instead of reconstructing the table.

Tablesmit reads the tab-separated format and reconstructs the full table
automatically. Here is the workflow:

Select your range in Excel including the header row. Copy with Ctrl+C
on Windows or Cmd+C on Mac. Open tablesmit.com and paste with Ctrl+V
anywhere on the page. The table appears with your data in the correct
cells, columns at the right widths, and headers in the first row.

From there you can resize columns by dragging, set column types for
proper formatting, add a caption, merge cells for grouped headers, and
export to PDF, Excel, LaTeX, CSV, PNG or JPEG.

The same workflow works with Google Sheets. Copy a range, paste into
Tablesmit. Sheets also writes tab-separated data to the clipboard
when you copy a selection.

Word tables work differently: Word writes HTML to the clipboard instead
of TSV. Tablesmit detects HTML tables and parses those too.

Free, no account, MIT licensed. tablesmit.com


This post originally appeared on the Tablesmit Blog at tablesmit.com/blog/copy-excel-table-to-web. Tablesmit is a free, open source table builder. Export to PDF, Excel, LaTeX, CSV, PNG. No account required. Try it at tablesmit.com.

Top comments (0)