How to use
- Copy cells from Excel, Google Sheets or a web page and paste them on the left (CSV works too).
- Choose the rule style and alignment, and fill in a caption and label.
- Copy the code into your LaTeX document. Booktabs rules need \usepackage{booktabs} in the preamble.
Options explained
- Booktabs
- Uses \toprule, \midrule and \bottomrule for the top, header and bottom rules — the usual style in journal papers.
- Auto alignment
- Columns whose body cells are all numbers (including percentages, thousands separators and scientific notation) are right-aligned; others are left-aligned.
- Escaping
- Converts & % $ # _ { } ~ ^ \ so LaTeX prints them correctly. Turn it off if your cells already contain LaTeX.
Example output
Three rows pasted from a spreadsheet, with a caption and label, produce this with the default options (Booktabs, automatic alignment, escaping on):
Item Price Change
Tea & cake 1,200.50 5%
R_2 score 0.93 -2.1%
\begin{table}[htbp]
\centering
\caption{Prices}
\label{tab:prices}
\begin{tabular}{lrr}
\toprule
Item & Price & Change \\
\midrule
Tea \& cake & 1,200.50 & 5\% \\
R\_2 score & 0.93 & -2.1\% \\
\bottomrule
\end{tabular}
\end{table}
The column specification is lrr because Price and Change contain only numbers, while the first column contains text. The caption is escaped too, and the label is written as you typed it.
Frequently asked questions
Are merged cells supported?
Not yet. Use \multicolumn and \multirow (from the multirow package) in the generated code.
The table is wider than the page. What can I do?
Wrap the tabular in \resizebox{\linewidth}{!}{...}, or switch to tabularx so a column can wrap.
Can decimal points be aligned?
Change that column to an S column from the siunitx package. Right alignment gives the same result when every number has the same number of decimals.
Privacy
This tool runs entirely in your browser. Your files and text are processed on your device and are never uploaded to our servers.