IZN Tools

CSV to LaTeX Converter

A spreadsheet export straight into a LaTeX table, special characters and all.

CSV
—
LaTeX
Waiting for input
Computed on this device

What you get

Paste the export, or drop the file in, and the LaTeX comes back on the right: a column spec with numeric columns aligned right, the header row in bold, and every cell escaped. Copy it, or download table.tex.

\begin{tabular}{lrr}
\toprule
\textbf{Material} & \textbf{Thickness} & \textbf{Price} \\
\midrule
Plywood & 12 & 1250 \\
Pine \& spruce & 18 & 2400 \\
\bottomrule
\end{tabular}

The two things that go wrong with a CSV

The separator. Not every CSV uses commas. Excel in a locale that writes decimals with a comma uses semicolons instead, and reading such a file as comma-separated puts the whole row into a single cell. Here the separator is detected, and the status line tells you what it decided.

The characters. A spreadsheet is full of &, % and _, and all three are LaTeX syntax. The compile error is the lucky case; the unlucky one is a document that builds fine and prints half a row, because a per cent sign turned the rest of it into a comment.

Steps

  1. Export from the spreadsheet as CSV, or copy the cells straight out of it.
  2. Paste here. Say whether the first row is a header.
  3. Pick booktabs for a paper, tabular if you want the lines, longtable if it runs past a page.
  4. Copy, or download the .tex.

Need the full set of options, or a Markdown table as input? That is the LaTeX table generator — the same engine without the fixed input. Going the other way, JSON to CSV and CSV to JSON handle the steps around it.

Questions

My file uses semicolons, not commas. Will it work?+

Yes. A semicolon file is what a Russian or German Excel writes by default, and it is detected. Guessing this wrong is the classic failure: the whole row lands in one cell and the tool looks broken when it was only misread.

Can I give it an .xlsx file?+

Not yet — only CSV, TSV and pasted text. An .xlsx is a zip archive of XML, and reading one needs machinery this site does not have yet. Export to CSV from the spreadsheet in the meantime; File → Save as → CSV in any of them.

What about the ampersands and per cent signs in my data?+

Escaped, every one. An unescaped `%` in LaTeX comments out the rest of the line, so a cell reading `15 % off` would silently become `15`.

Does the file get uploaded?+

No. It is read and converted in this tab; nothing leaves your computer.