What you get
A LaTeX table environment, ready to paste into a document: the column spec,
the rows with every cell escaped, and the surrounding table float with your
caption if you set one. Something like this:
\begin{table}[h]
\centering
\begin{tabular}{lrr}
\toprule
\textbf{Material} & \textbf{Thickness} & \textbf{Price} \\
\midrule
Plywood & 12 & 1250 \\
Pine \& spruce & 18 & 2400 \\
\bottomrule
\end{tabular}
\end{table}
Note what happened to "Pine & spruce". That is the part a generator earns its place on.
Three steps
- Paste the table — from a spreadsheet, as CSV, as tab-separated text, or as a Markdown table. The format is detected, and the status line says which one it decided on.
- Pick the style and say whether the first row is a header.
- Copy the result, or download it as a
.texfile.
Why escaping is the whole job
LaTeX reads ten characters as instructions rather than text. & ends a cell,
% starts a comment, _ and ^ only mean anything in maths mode, and a
stray $ opens one. A table copied out of a spreadsheet is full of them.
The failure people notice is a document that will not compile. The failure
that costs more is the quiet one: a price of 15 % off compiles perfectly and
prints 15, with the rest of the row gone. Everything here is escaped before
it reaches the output.
Which environment, in one line each
- booktabs —
\toprule,\midrule,\bottomrule, no vertical lines. The house style of most journals, and the package's own manual argues against the lines rather than omitting them by accident. - tabular — the plain environment, with
\hlineif you want the grid. - longtable — breaks across pages and repeats the header on each one.
If the table is longer than a page and you use tabular, it will run off the
bottom instead of continuing. That is the usual reason to reach for the third.
Working the other way, from a .tex file into something a spreadsheet can
open? The CSV to LaTeX converter is the same engine with
the input fixed, and JSON to CSV handles the step before it.
Questions
Which style should I pick?+
booktabs for a paper — it is what journals expect, and it forbids vertical rules on purpose. tabular when you want the lines. longtable when the table runs past one page, because tabular will not break.
What happens to an ampersand or a per cent sign in my data?+
They are escaped. This matters more than it sounds: in LaTeX an unescaped `%` comments out the rest of the line, so a cell reading `15 % off` would silently print as `15`. Every cell goes through escaping for `& % $ # _ { } ~ ^` and the backslash.
Why are my numbers right-aligned without asking?+
Because a column where every value is a number reads better right-aligned, and that is what the column spec gets. The header row does not vote, so a column of prices under the word Price is still numeric.
Can I paste a Markdown table?+
Yes. The input is detected, including the alignment row — `:---:` becomes a centred column. You can also force the format if the guess is wrong.
Does my file leave my computer?+
No. The conversion happens in this tab; nothing is uploaded.