LaTeX tables cheat sheet

Find the table you need. Copy the code. Change the cells. Each example shows the LaTeX code and the table that LaTeX makes from it.

Do you prefer not to write the code? Make the table in the LaTeX Tables Generator and copy the code it makes. Each example below tells you how.

Start

Read the table code

Cells go from left to right. Rows go from top to bottom.

The parts of the tabular code The column letters l, c and r set three columns: left, centre and right aligned. The ampersand separates the cells of a row. Two backslashes end a row. \begin{tabular}{lcr} Name & Type & Price \\ Apple & Fruit & 1.20 \\ \end{tabular} ↑ one letter for each column & ends a cell · \\ ends a row A row of 3 cells has 2 & signs. NameTypePrice AppleFruit1.20 l: leftc: centrer: right

The shaded columns show the alignment only. LaTeX does not draw them.

Know the two environments

The table environment holds the tabular environment The outer table environment holds the caption, the label and the tabular environment, which holds the cells. \begin{table}[htbp] \centering \caption{Prices} \label{tab:prices} \begin{tabular}{lr} ... cells ... \end{tabular} \end{table} table: a float LaTeX moves it to a good place. It holds the caption and label. tabular: the cells It stays where you write it. You can use it without table.

A table float must fit on one page. For a table that continues on the next page, see Long tables.

A simple table

Write the cells row by row. The letters after tabular align the columns.

LaTeX
\begin{tabular}{lcr}
Name  & Type      & Price \\
Apple & Fruit     & 1.20  \\
Leek  & Vegetable & 0.85  \\
\end{tabular}
Three columns without lines: Name left aligned, Type centred, Price right aligned. The rows are Apple, Fruit, 1.20 and Leek, Vegetable, 0.85.
  • {lcr} makes three columns: left, centre and right aligned.
  • Write & between the cells and \\ at the end of each row.
  • LaTeX ignores extra spaces. Line up the & signs to make the code easy to read.
  • A tabular alone has no caption and no number. To add them, put it in a table float, as in the next example.

In our editor Type in the cells. Click the alignment buttons on the toolbar to align the text. The code under the table changes as you type.

A complete document

Save this code as table.tex. Compile it two times with pdflatex table.tex, or open it in an online editor such as Overleaf. The second run puts the table number in the text.

Complete document
\documentclass{article}
\usepackage{booktabs}
\usepackage{caption} % space under a caption above a table

\begin{document}

Table~\ref{tab:prices} shows the prices.

\begin{table}[htbp]
  \centering
  \caption{Prices of fruit}
  \label{tab:prices}
  \begin{tabular}{lr}
    \toprule
    Fruit & Price \\
    \midrule
    Apple & 1.20 \\
    Pear  & 1.50 \\
    \bottomrule
  \end{tabular}
\end{table}

\end{document}
The text "Table 1 shows the prices." and below it Table 1: Prices of fruit, with Apple 1.20 and Pear 1.50 between horizontal rules.
  • Put the packages (\usepackage) before \begin{document}.
  • Put \label after \caption. Give each table a different label.
  • Table~\ref{tab:prices} prints the table number. The ~ keeps the word and the number on one line.
  • Put \caption after the tabular to put the caption below the table.
  • Without the caption package, a caption above a table touches its top line.

In our editor In the options under the code, select Caption: Above or Below and type the text and the label. Select Complete document to get the document with all the packages it needs.

Caption and placement

The letters after \begin{table} tell LaTeX where it can put the table. LaTeX uses the first place that is possible. The letters do not force a place.

LetterLaTeX can put the table
hhere, where the code is, if it fits
tat the top of a page
bat the bottom of a page
pon a page that has only floats
!with fewer limits (for example, a larger table at the top)
Hexactly here. Needs \usepackage{float}.

Start with [htbp]: it lets LaTeX use all four places. A table with no place that it fits goes to the end of the chapter or document.

Where the placement letters put a table On the first page, h puts the table between paragraphs where the code is, t at the top of the page and b at the bottom. On the second page, p puts tables on a page of floats only. t h b p ← the code

Lines

Lines around all cells

Draw a grid when each cell needs a border.

LaTeX
\begin{tabular}{|l|c|r|}
\hline
Name  & Type      & Price \\
\hline
Apple & Fruit     & 1.20  \\
\hline
Leek  & Vegetable & 0.85  \\
\hline
\end{tabular}
A table with lines around all cells: Name, Type, Price; Apple, Fruit, 1.20; Leek, Vegetable, 0.85.
  • A | in the column letters draws a vertical line.
  • \hline draws a horizontal line across all columns.
  • Put \hline before the first row and after each \\.

In our editor Click the all-borders button on the toolbar, or select Table › Add all borders.

Lines in some places

Draw a line under some columns only, or between two columns.

LaTeX
\begin{tabular}{l|rr}
Name  & 2024 & 2025 \\
\hline
Apple & 120  & 135  \\
Leek  & 80   & 95   \\
\cline{2-3}
Total & 200  & 230  \\
\end{tabular}
A vertical line after the Name column, a line under the header and a short line above Total under the number columns only.
  • \cline{2-3} draws a line under columns 2 to 3.
  • {l|rr} draws one vertical line, between column 1 and column 2.
  • For a line around one cell only, use \multicolumn{1}{|l|}{text} (see Align one cell).

In our editor Click the border editing button on the toolbar. Then click the edges of the cells to add or remove lines. Hold Shift to change a full row or column.

Double lines

Use double lines to separate the header from the data.

LaTeX · needs hhline
\begin{tabular}{|l||r|r|}
\hline
Name  & 2024 & 2025 \\
\hhline{|=#=|=|}
Apple & 120  & 135  \\
\hline
Leek  & 80   & 95   \\
\hline
\end{tabular}
A grid with a double vertical line after the Name column and a double horizontal line under the header. The lines cross cleanly.
  • || in the column letters draws a double vertical line.
  • \hline\hline draws a double horizontal line.
  • With vertical lines, use \hhline so that the lines cross cleanly: = is a double line under a column, - a single line, | a vertical line, # a double line crossing a double vertical line.

In our editor In border editing, select the double line button next to the border editing button. Then click the edges.

Publication style

Use three horizontal rules and no vertical lines, as journals and books do.

LaTeX · needs booktabs
\begin{tabular}{lrr}
\toprule
Name  & 2024 & 2025 \\
\midrule
Apple & 120  & 135  \\
Leek  & 80   & 95   \\
\bottomrule
\end{tabular}
A table with a thick rule at the top, a thin rule under the header and a thick rule at the bottom. There are no vertical lines.
  • \toprule goes above the header. \midrule goes under it.
  • \bottomrule goes after the last row.
  • Do not use | with booktabs. The rules have space around them, so vertical lines have gaps.
  • Write @{} before and after the column letters, for example {@{}lrr@{}}, to make the rules end at the text.

In our editor In the options under the code, select Style: Booktabs.

Cells

Bold, italic and colour

Change the font of one cell.

LaTeX · needs ulem, xcolor
\begin{tabular}{ll}
\textbf{Bold}             & \textit{Italic}            \\
\uline{Underlined}        & \texttt{Monospaced}        \\
\textcolor{red}{Red text} & \textbf{\textit{Both}}     \\
{\small Small}            & {\large Large}             \\
\end{tabular}
Cells with bold, italic, underlined, monospaced, red, bold italic, small and large text.
  • \uline needs \usepackage[normalem]{ulem}. Without normalem, ulem changes \emph to underline.
  • \textcolor needs \usepackage{xcolor}.
  • The braces in {\small Small} keep the size change in that cell.
  • To make all cells of a column bold, use >{\bfseries}l. It needs \usepackage{array}.

In our editor Select the cells. Click B, I or U, or the text colour button, on the toolbar.

Align one cell

Align one cell differently from its column.

LaTeX
\begin{tabular}{|l|l|}
\hline
\multicolumn{1}{|c|}{Name} & \multicolumn{1}{c|}{Taste} \\
\hline
Apple                      & Sweet \\
\hline
\multicolumn{1}{|r|}{Leek} & Mild  \\
\hline
\end{tabular}
A grid in which the header cells are centred, Apple is left aligned and Leek is right aligned.
  • \multicolumn{1}{c}{Name} makes a cell of one column with its own alignment.
  • The cell's letters replace the column's letters, its lines too. Write the lines again: {|c|} for the first column, {c|} for the next ones.

In our editor Select the cells. Click the alignment buttons on the toolbar.

Merge columns

Make one cell across two or more columns, for example a header over a group of columns.

LaTeX · needs booktabs
\begin{tabular}{lrrrr}
\toprule
      & \multicolumn{2}{c}{2024} & \multicolumn{2}{c}{2025} \\
\cmidrule(lr){2-3} \cmidrule(lr){4-5}
Name  & Sold & Price & Sold & Price \\
\midrule
Apple & 120  & 1.10  & 135  & 1.20  \\
Leek  & 80   & 0.80  & 95   & 0.85  \\
\bottomrule
\end{tabular}
A header row in which 2024 is over the Sold and Price columns and 2025 is over the next two. A short rule is under each group header.
  • \multicolumn{2}{c}{2024} makes one centred cell across two columns.
  • The merged cell replaces the cells it covers. Write one & less for each column it covers.
  • \cmidrule(lr){2-3} draws a booktabs rule under columns 2 to 3. (lr) makes it shorter at the left and the right, so that two rules do not touch.

In our editor Drag the mouse over the cells to select them. Click the merge button on the toolbar. Click the split button next to it to undo it.

Merge rows

Make one cell across two or more rows.

LaTeX · needs multirow
\begin{tabular}{|l|l|r|}
\hline
Type                   & Name  & Price \\
\hline
\multirow{2}{*}{Fruit} & Apple & 1.20  \\
\cline{2-3}
                       & Pear  & 1.50  \\
\hline
Vegetable              & Leek  & 0.85  \\
\hline
\end{tabular}
How merged cells count in the code A multicolumn cell replaces the cells it covers, so its row has fewer ampersands. A multirow cell does not: the rows below it keep an empty cell in its place. \multicolumn{2} 2024x \multicolumn{2}{c}{2024} & x \\ One cell in place of two: one & fewer. \multirow{2} FruitApplePear \multirow{2}{*}{Fruit} & Apple \\ & Pear \\ The row below keeps an empty cell.
  • \multirow{2}{*}{Fruit} makes a cell across 2 rows. * makes it as wide as its text.
  • In the rows under it, leave the cell empty but keep its &.
  • Use \cline{2-3}, not \hline, so that the line does not cross the merged cell.
  • To wrap the text in the merged cell, write a width in place of *, for example {2cm}, or {=} in a column with a width.

In our editor Select the cells in a column and click the merge button on the toolbar.

Merge a block of cells

Make one cell across columns and rows together.

LaTeX · needs multirow
\begin{tabular}{|c|c|c|}
\hline
\multicolumn{2}{|c|}{\multirow{2}{*}{Block}} & A \\
\cline{3-3}
\multicolumn{2}{|c|}{}                       & B \\
\hline
C           & D           & E \\
\hline
\end{tabular}
Block is one cell across two columns and two rows. A and B are on its right. C, D and E are in the row below.
  • Put the \multirow in a \multicolumn.
  • In the rows under it, write an empty \multicolumn of the same width: \multicolumn{2}{|c|}{}.

In our editor Select the block of cells and click the merge button on the toolbar.

Lines in a cell

Break the text of a cell into lines where you want.

LaTeX · needs makecell
\begin{tabular}{|l|l|}
\hline
\begin{tabular}[c]{@{}l@{}}Common\\ name\end{tabular}
  & \makecell{Price\\ (per kg)} \\
\hline
Apple & 1.20 \\
\hline
Leek  & 0.85 \\
\hline
\end{tabular}
The header cells are on two lines: Common name, and Price (per kg).
  • A plain \\ ends the row. To break a line in a cell, put the cell's text in a small tabular (as our editor does) or in \makecell.
  • @{} removes the space around the small tabular, so the text lines up with the other cells.
  • \makecell needs \usepackage{makecell}. It centres the lines. Write \makecell[l]{...} to align them left.
  • In a column with a width (p{3cm}), use \newline.

In our editor Double-click a cell to edit it. Press Enter to start a new line in the cell.

Width

Fixed column width

Give a column a width. Its text wraps to more lines.

LaTeX · needs array
\begin{tabular}{|l|p{3.5cm}|>{\raggedright\arraybackslash}p{3.5cm}|}
\hline
Name  & Justified text & Ragged right text \\
\hline
Apple & A sweet fruit that grows on trees in cool climates.
      & A sweet fruit that grows on trees in cool climates. \\
\hline
\end{tabular}
Two columns 3.5 cm wide with the same sentence: in the first, the lines are justified with wide spaces; in the second, they are ragged right.
  • p{3.5cm} makes a column 3.5 cm wide. The text wraps and aligns at the top.
  • LaTeX justifies the text in a p column. In a narrow column, this makes wide spaces.
  • >{\raggedright\arraybackslash} before p aligns the text left. \arraybackslash makes \\ end the row again. This needs \usepackage{array}.
  • m{3.5cm} centres the text vertically and b{3.5cm} aligns it at the bottom. Both need array.
  • l, c and r columns never wrap their text.

In our editor Drag the right edge of the column header above the table, or right-click the header and select Set column width. Double-click the edge to remove the width.

As wide as the text

Make a table as wide as the text on the page. Some columns wrap to fill the width.

LaTeX · needs tabularx
\begin{tabularx}{\textwidth}{|l|X|X|}
\hline
Name  & Description                           & Use                               \\
\hline
Apple & A sweet fruit that grows on trees.    & Eat raw, bake or press for juice. \\
\hline
Leek  & A mild vegetable of the onion family. & Cook in soups and stews.          \\
\hline
\end{tabularx}
A table as wide as the text. The Description and Use columns share the width and their text wraps.
  • tabularx needs \usepackage{tabularx}. Its first argument is the width of the table.
  • X columns wrap their text. They share the width that the other columns leave.
  • \textwidth is the width of the text on the page. In a two-column document, use \columnwidth.
  • To give X columns different shares, write >{\hsize=1.5\hsize}X and >{\hsize=0.5\hsize}X. The shares must add up to the number of X columns.

In our editor In the options under the code, select Width: Wrap to text width. The columns with a width share the space in proportion to their widths.

Scale a table

Make the whole table larger or smaller, its text too, to fit a width.

LaTeX · needs graphicx, booktabs
\resizebox{\textwidth}{!}{%
\begin{tabular}{lrrrr}
\toprule
Name  & 2022 & 2023 & 2024 & 2025 \\
\midrule
Apple & 101  & 110  & 120  & 135  \\
Leek  & 62   & 71   & 80   & 95   \\
\bottomrule
\end{tabular}%
}
A small table scaled up to the text width: its text is much larger than the text on the page.
  • \resizebox{\textwidth}{!}{...} scales the table to the text width. ! keeps the proportions. It needs \usepackage{graphicx}.
  • The text size changes with the table. Large text or very small text is difficult to read. If possible, wrap the text in place of scaling.
  • The % signs at the line ends stop extra spaces.
  • You cannot scale a long table.

In our editor In the options under the code, select Width: Scale to text width or Scale to column width.

Space in a table

Make the rows higher or the space between the columns larger.

LaTeX · needs booktabs
{ % The braces keep the changes local
\renewcommand{\arraystretch}{1.4}
\setlength{\tabcolsep}{12pt}
\begin{tabular}{lr}
\toprule
Name  & Price \\
\midrule
Apple & 1.20  \\
Pear  & 1.50  \\
\addlinespace
Leek  & 0.85  \\
\bottomrule
\end{tabular}
}
A table with high rows, wide space between the columns and extra space before Leek.
  • \arraystretch multiplies the height of the rows. 1.4 is 40% higher.
  • \tabcolsep is the space at each side of a column. The default is 6pt.
  • \addlinespace (booktabs) adds space between two rows.
  • Put the changes in braces, or in the table float, to change only this table.

Colour

Cell and row colour

Give a cell or a row a background colour.

LaTeX · needs xcolor
\begin{tabular}{lrr}
\rowcolor{gray!25}
Name  & 2024 & 2025                    \\
Apple & 120  & \cellcolor{green!25}135 \\
Leek  & 80   & \cellcolor{red!25}75    \\
\end{tabular}
A table with a grey header row, a light green cell with 135 and a light red cell with 75.
  • Colours need \usepackage[table]{xcolor}.
  • \rowcolor goes at the start of the row. \cellcolor goes in the cell.
  • green!25 is 25% green and 75% white.
  • To use your own colour, write \definecolor{mygreen}{HTML}{C8F2C8} in the preamble.
  • To colour a column, write >{\columncolor{gray!15}}l in the column letters.

In our editor Select the cells. Click the background colour button on the toolbar.

Striped rows

Give the rows two colours that alternate, so that long rows are easy to follow.

LaTeX · needs xcolor
\begin{table}[htbp]
\centering
\rowcolors{2}{gray!15}{white}
\begin{tabular}{lr}
Name  & Price \\
\hline
Apple & 1.20  \\
Leek  & 0.85  \\
Pear  & 1.50  \\
Plum  & 2.10  \\
\end{tabular}
\end{table}
A table in which every second row, from the second row, is light grey.
  • \rowcolors{2}{gray!15}{white}: from row 2, odd rows are grey and even rows are white.
  • It needs \usepackage[table]{xcolor}.
  • Put it in the table float. If not, it changes all the tables after it.

In our editor Give the rows alternating background colours. Our editor writes \rowcolors for four or more such rows.

Content

Align numbers

Align the numbers of a column at the decimal point.

LaTeX · needs siunitx, booktabs
\begin{tabular}{lS[table-format=3.2]}
\toprule
Test & {Time (s)} \\
\midrule
A    & 2.5        \\
B    & 12.30      \\
C    & 105.07     \\
\bottomrule
\end{tabular}
The times 2.5, 12.30 and 105.07 aligned at their decimal points.
  • An S column (needs \usepackage{siunitx}) aligns numbers at the decimal point.
  • table-format=3.2 keeps space for 3 digits before the point and 2 after it.
  • Put text in braces, {Time (s)}, so that siunitx does not read it as a number.

Math and special characters

Write formulas in cells. Escape the characters that LaTeX uses for its code.

LaTeX
\begin{tabular}{ll}
Formula     & $E = mc^2$, $\alpha \le \beta$ \\
Percent     & 50\%                           \\
Ampersand   & R\&D                           \\
Underscore  & file\_name                     \\
Dollar      & \$10                           \\
Hash        & \#1                            \\
Braces      & \{ \}                          \\
Backslash   & \textbackslash{}               \\
Tilde       & \textasciitilde{}              \\
Caret       & \textasciicircum{}             \\
\end{tabular}
Cells with a formula E = mc squared, alpha less than or equal to beta, and the characters percent, ampersand, underscore, dollar, hash, braces, backslash, tilde and caret.
  • Put math between $ signs.
  • A plain & ends the cell and a plain % starts a comment: the rest of the line is lost. Write \& and \%.
  • See all the characters in Characters to escape.

In our editor In the options under the code, Escape special characters escapes them for you. Clear it to type LaTeX, such as $x^2$, in the cells.

Notes under a table

Add notes under a table and marks in the cells that refer to them.

LaTeX · needs threeparttable, booktabs
\begin{table}[htbp]
\centering
\begin{threeparttable}
\caption{Prices}
\begin{tabular}{lr}
\toprule
Name           & Price \\
\midrule
Apple\tnote{a} & 1.20  \\
Pear           & 1.50  \\
\bottomrule
\end{tabular}
\begin{tablenotes}
\footnotesize
\item[a] Price in March.
\end{tablenotes}
\end{threeparttable}
\end{table}
Table 1: Prices. A small a after Apple refers to the note "a Price in March" under the table.
  • threeparttable makes the caption and the notes as wide as the table.
  • \tnote{a} puts the mark in a cell. \item[a] gives the note's text.
  • Do not use \footnote in a tabular: LaTeX does not print its text.

Size

Long tables

Let a table with many rows continue on the next pages.

LaTeX · needs longtable, booktabs
\begin{longtable}{lr}
\caption{Prices of fruit}\label{tab:prices} \\
\toprule
Name & Price \\
\midrule
\endfirsthead
\multicolumn{2}{l}{Table \thetable{} -- continued} \\
\toprule
Name & Price \\
\midrule
\endhead
\midrule
\multicolumn{2}{r}{Continued on next page} \\
\endfoot
\bottomrule
\endlastfoot
Apple & 1.20 \\
Pear  & 1.50 \\
% ... many more rows ...
\end{longtable}
A long table on two pages Page 1 starts with the caption and the header and ends with "Continued on next page". Page 2 starts with "Table 1 continued" and the header again, and ends with the bottom rule. Table 1: Prices of fruit NamePrice Table 1 – continued NamePrice Apple1.20 Pear1.50 … Plum2.10 … Continued on next page first page: \endfirsthead next pages: \endhead \endfoot \endlastfoot
  • longtable needs \usepackage{longtable}. Do not put it in a table float: it makes its own caption.
  • The rows before \endfirsthead start the table. The rows before \endhead start each next page.
  • The rows before \endfoot end each page. The rows before \endlastfoot end the table.
  • Compile the document two or three times: longtable finds the column widths over more runs.
  • For a long table with X columns, use xltabular.

In our editor In the options under the code, select Long table: Split across pages. You can also repeat the header rows and add a "continued" line.

Wide tables

Put a table that is too wide on a page turned sideways.

LaTeX · needs pdflscape
\begin{landscape}
\begin{table}[htbp]
\centering
\caption{Monthly sales}
\begin{tabular}{l*{12}{r}}
Name  & Jan & Feb & Mar & Apr & May & Jun
      & Jul & Aug & Sep & Oct & Nov & Dec \\
\hline
Apple & 120 & 118 & 125 & 130 & 128 & 140
      & 151 & 149 & 160 & 171 & 166 & 180 \\
\end{tabular}
\end{table}
\end{landscape}
A table on a landscape page A portrait page with text, then a page turned sideways that holds a wide table. Table 1: Monthly sales Jan … Dec: 13 columns fit
  • landscape needs \usepackage{pdflscape} or \usepackage{lscape}. With pdflscape, PDF viewers show the page turned.
  • The landscape page starts on a new page.
  • Before you turn the page, try to make the table narrower: wrap long text in columns with a width, make the headers shorter, use \small, or make \tabcolsep smaller.
  • In a two-column document, use table* in place of table to put the table across both columns.

In our editor In the options under the code, select Placement: Rotate to a landscape page.

Reference

Column types

LettersColumn
l c rLeft, centred, right. As wide as the text.
p{3cm}3 cm wide. Text wraps, aligned at the top.
m{3cm}Text wraps, centred vertically. Needs array.
b{3cm}Text wraps, aligned at the bottom. Needs array.
XShares the free width. Text wraps. Needs tabularx.
SNumbers aligned at the decimal point. Needs siunitx.
| ||A single or double vertical line.
@{}No space at this side of the column.
*{4}{r}The same as rrrr.
>{\bfseries}lApplies a command to all cells of the column. Needs array.

To use a ragged-right column with a width many times, define it in the preamble (needs array):

\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}

Then write L{3cm} in the column letters.

Packages

PackageFor
booktabs\toprule, \midrule, \bottomrule, \cmidrule
multirow\multirow
hhline\hhline: lines that cross cleanly
arraym, b, >{...} columns
tabularxtabularx, X columns
xcolorColours; with [table]: \rowcolor, \cellcolor, \rowcolors
graphicx\resizebox
makecell\makecell: lines in a cell
siunitxS columns
threeparttableNotes under a table
longtableTables across pages
pdflscapeLandscape pages
floatThe [H] placement

In Beamer presentations, use \usepackage{colortbl} for colours in tables: Beamer loads xcolor itself.

Characters to escape

These characters are part of LaTeX's code. To print them in a cell, write:

&\&
%\%
$\$
#\#
_\_
{\{
}\}
~\textasciitilde{}
^\textasciicircum{}
\\textbackslash{}
<\textless{}
>\textgreater{}

Errors and fixes

LaTeX says or doesDo this
Extra alignment tab has been changed to \cr A row has too many & signs. A row of n cells has n − 1. Count a merged cell as the columns it covers.
Misplaced \noalign A \hline or rule is not after a \\. Add the \\ at the end of the row before it.
Undefined control sequence \toprule (or \multirow, …) Add the package to the preamble. See Packages.
Unknown column type X (or m, S, …) Add the package. X also needs the tabularx environment, not tabular.
Overfull \hbox: the table goes into the margin Wrap long text in a column with a width, or make the table as wide as the text.
The table is on another page A float moves. Use [htbp]. For "exactly here", use [H] with the float package.
The reference shows ?? or a wrong number Put \label after \caption. Compile again.
The text after % is missing % starts a comment. Write \%.
The table goes past the bottom of the page Use a long table.

Change a table that you already have

Open the LaTeX Tables Generator and select File › From LaTeX code. Paste the code of your table. Edit the table, then copy the new code.