Table to LaTeX & Markdown
Paste a spreadsheet table and get LaTeX, Markdown or HTML table code
Loading the tool…
Turns a table copied from Excel or Google Sheets into LaTeX tabular, Markdown or HTML table code. Use it to put a table into a paper or report, or to edit an existing LaTeX or Markdown table.
How to use
- On "Edit table", copy a range from Excel or Google Sheets and paste it into any cell. Edit cells directly and use "Add row" or "Add column" to change the size.
- Choose the alignment of each column in the box above it: "Left (l)", "Center (c)" or "Right (r)".
- Under "Output settings", set "First row is a header", "Use booktabs rules" and "Wrap in a table environment (caption, label)".
- Choose LaTeX, Markdown or HTML as the output and press "Copy" or "Download".
How it works
- The ten LaTeX special characters (& % $ # _ { } ~ ^ \) are escaped automatically. A line break inside a cell becomes a space.
- With alignment on "Auto", a column whose cells below the header are all numbers is aligned right, and other columns are aligned left.
- On "Paste or import", a LaTeX tabular or Markdown table can be turned back into the grid. For LaTeX only the first tabular is read, and \multicolumn cells are split into empty cells.
Questions and answers
- How do I convert an Excel table to LaTeX?
- Copy the range in Excel and paste it into the first cell on "Edit table". The tabular code appears below at once; press "Copy" and paste it into your document.
- What does booktabs change?
- The table uses only three horizontal rules, \toprule, \midrule and \bottomrule, and no vertical lines. Your document needs \usepackage{booktabs} in the preamble.
- How do I center a column in a Markdown table?
- Put a colon on both sides of the separator, as in :---:. Here, choose "Center (c)" for the column and the output does this for you.
- Are merged cells supported?
- No. The grid cannot merge cells, and \multicolumn in imported LaTeX is split into empty cells.