Table Editor

LaTeX Table Generator

Edit the table in the grid, with header rows, borders and merged cells, then copy the LaTeX code into your document.

How to create your table

  1. Type or paste your data. Set column alignment with Format › Align and borders with Format › Borders.
  2. In the output panel menu (⋮), choose Lines or Booktabs rules, and tabular or longtable for a table that runs over several pages.
  3. Copy the code into your document and add the packages it uses to the preamble.

Example output

\begin{table}
  \centering
  \begin{tabular}{lrr}
    \textbf{Item} & \textbf{Qty} & \textbf{Price} \\
    Widget        & 4            & 3.00           \\
    Gadget        & 12           & 5.50           \\
  \end{tabular}
\end{table}

The tabular environment

LaTeX builds tables with the tabular environment. Its argument lists one letter per column: l, c or r for left, centered or right alignment. A | between the letters draws a vertical line.

Inside the environment, & separates cells and \\ ends a row. \hline draws a horizontal line across the table. The generator wraps the tabular in a table float with \centering, so you can add \caption and \label and refer to the table with \ref.

\begin{tabular}{l|r}
  \hline
  Item   & Qty \\
  \hline
  Widget & 4   \\
  \hline
\end{tabular}

booktabs: \toprule, \midrule and \bottomrule

The booktabs package replaces \hline with three rules of different weight: \toprule above the table, \midrule under the header and \bottomrule at the end. It also adds space around the rules, so rows do not touch the lines.

The booktabs documentation advises against vertical lines, so the generator leaves them out in booktabs mode. Choose Rules › Booktabs in the output panel menu, and add \usepackage{booktabs} to your preamble.

Merged cells: \multicolumn and \multirow

\multicolumn{2}{c}{Text} spans two columns and sets the alignment of the merged cell. \multirow{2}{*}{Text} spans two rows and needs \usepackage{multirow}. The rows below a \multirow cell need an empty cell in that column, and a horizontal line has to skip the merged cell with \cline.

When you merge cells in the editor, the generator writes these commands, the empty cells and the \cline ranges for you.

Tables longer than a page

A tabular cannot break across pages. For long tables, choose Table type › longtable in the output panel menu. The longtable package breaks the table over pages and repeats the header rows at the top of each new page. Add \usepackage{longtable} to your preamble.

Common LaTeX table errors

Misplaced alignment tab character & means an & is used outside a table or in the text of a cell. Write \& for a literal ampersand. The generator escapes &, %, $, #, _ and braces for you.

Extra alignment tab has been changed to \cr means a row has more cells than the column specification allows. Undefined control sequence on \toprule or \multirow means the booktabs or multirow package is missing from the preamble.

Unicode character ... not set up for use with LaTeX means pdflatex has no glyph for a character, such as an emoji or a Chinese character. Compile with XeLaTeX or LuaLaTeX instead, which use system fonts.

Converting Excel or CSV to LaTeX

Copy the cells in Excel or Google Sheets and paste them into the grid, or open a .csv, .xlsx or .ods file with File › Import. You can also paste an existing tabular to edit it here.

Number formats, such as currency, are written as the grid shows them. To move a table from LaTeX to Typst, paste the tabular and copy the Typst output.

What the editor can do

  • Merge and split cells
  • Paste cells from Excel, Google Sheets or an HTML table
  • Import CSV, TSV, Excel (.xlsx), OpenDocument (.ods), Markdown, HTML, LaTeX, Typst, JSON, MediaWiki and plain text tables
  • Copy the table as one of 14 text formats, or download it as an Excel, OpenDocument or Word (.docx) file
  • Header rows and columns, borders, and bold, italic and alignment per cell
  • Number formats for numbers, percentages and currencies
  • Checkboxes, and one link per cell. Links stay links in Markdown, HTML, LaTeX, Typst, Excel, Word and the other formats that have them
  • Sort, transpose, fill down or right, and find and replace with regular expressions
  • Undo and redo, keyboard shortcuts and a command palette (Alt+Q)
  • Save tables in the browser, reopen recent tables and share a table as a link
  • Also available as a Windows app

Table Editor for Windows

The same editor as a Windows app, with what a browser tab can't do.

  • Tabs. Keep several tables open at once. Tabs with unsaved changes come back when you start the app again.
  • Your own files. Open Excel, CSV, Markdown, LaTeX and other files directly, also from Windows Explorer, and save back to the same file.
  • Offline, without ads. Works without an internet connection. No ads, no analytics, and nothing leaves your computer.

A one-time purchase in the Microsoft Store.

Get it from MicrosoftGet it from Microsoft

Frequently asked questions

How do I convert an Excel table to LaTeX?
Copy the cells in Excel and paste them into the grid with Ctrl+V, or open the .xlsx file with File › Import, which keeps merged cells. Choose Lines or Booktabs rules in the output panel menu (⋮), copy the code and add the packages named in its first line to your preamble.
Which packages do I need?
The first line of the output is a comment that names the packages the table needs, ready to copy into your preamble. Booktabs rules need \usepackage{booktabs}, longtable needs \usepackage{longtable} and merged rows need \usepackage{multirow}. A cell with line breaks needs \usepackage{makecell}, Shrink to page width needs \usepackage{adjustbox} and Align decimal points needs \usepackage{siunitx}. The H position needs \usepackage{float}. A link needs \usepackage{hyperref} and a checked checkbox (\checkmark) needs \usepackage{amssymb}. A plain tabular needs no package. The comment does not list packages for commands you type in cells: a cell with \SI{3}{\metre} needs \usepackage{siunitx} in your preamble.
Which characters are escaped?
The characters & % $ # _ { } get a backslash. A backslash, ~, ^, <, >, | and the backtick are replaced with commands such as \textbackslash{}, and --, '' and ,, are split so LaTeX does not turn them into a dash or curly quotes. Symbols such as ≥, ≤, ≠, ≈ and → are written as math, since pdflatex cannot print them as text. Math and LaTeX commands you type are not escaped (see the next question). The export is tested by compiling it with pdflatex.
Can I use math and LaTeX commands in cells?
Yes. With Keep LaTeX commands on (the default, in the output panel menu ⋮), math such as $x^2$ or \(a+b\) and commands such as \textbf{...}, \cite[p.~3]{knuth} or \% are written as you typed them, and the rest of the cell is escaped. A dollar sign in a price, as in $5 and $10, stays text: math needs a non-space character right after the opening $ and right before the closing one, and no digit after it. A backslash that does not start a command, as in C:\Users or \d+, stays text, and so do commands that would break the table, such as \\, \begin or \verb inside bold text. Importing LaTeX keeps math and commands as written, while escapes and accents such as \% and \"u become the characters they print. Turn the setting off to escape everything.
What happens to links and checkboxes?
A link is written as \href{url}{text}, or as \url{...} when the cell holds only the address. %, # and & in the address get a backslash, as hyperref expects. Importing LaTeX reads \href and \url back as links when they cover the whole cell. A checked checkbox is written as \checkmark and an unchecked one as an empty cell. The Checkboxes as setting in the output panel menu (⋮) changes that to Yes and No, or true and false.
Can I merge cells?
Yes. Merged cells use \multicolumn and \multirow, with \cline where a rule has to skip a merged cell.
How do I make a matrix?
Choose a matrix under Table type in the output panel menu (⋮): bmatrix [ ], pmatrix ( ), Bmatrix { }, vmatrix | |, Vmatrix ‖ ‖ or matrix without brackets. The table is written as that amsmath environment inside \[ \], and each cell as math, so a_{11} or \frac{1}{2} work as typed. Letters and words are written as math too. A cell LaTeX can't read as math, such as Müller or \input{x}, is written as \text{...}. For an augmented matrix, turn on a vertical border through every row between two columns: the matrix is then an array with a | there, between \left[ and \right], and a horizontal border through every column becomes \hline. Matrices need \usepackage{amsmath}. File › Import reads matrices too, also an array between \left and \right.
Can I add a caption and a label?
Add a caption with Table › Table caption. With Include caption on, it is written as \caption{...}. Turn on Include \label to add a \label{tab:...} you can refer to with \ref.

Sources and further reading

About Table Editor · Changelog

Loading the editor…