↧ Expand ↧↥ Collapse ↥
Result (updated automatically as you edit the table)

Typst Tables Generator

How to use the Typst tables generator?

  1. Enter the data. Copy cells from a spreadsheet (Excel, Google Sheets, LibreOffice Calc) or a table on a web page, click a cell and press Ctrl+V: the table grows to fit them. Or click a cell and type: typing replaces its text, while a double click or Enter edits the text that is there (Esc or a click elsewhere ends the edit). Tab and the arrow keys move to the next cell; Tab in the last cell adds a row. Add a row or a column at the end with the + under or right of the table, and add and remove them anywhere with the Row and Column menus, or by right-clicking a cell. You can also import an Excel workbook or a CSV file with File / Import CSV or Excel file, or drop it on the table.
  2. Adjust text alignment, borders and colors using the options from the menu and using the toolbar buttons -- formatting is applied to all the selected cells.
  3. The table's Typst code appears under the editor as you edit -- copy it to your document.

What does the generated code look like?

The table is a #table call with one content block per cell. Merged cells, background colors and alignments that differ from the column's use table.cell. When some cells have no borders, the table has no strokes and the borders are drawn with table.hline and table.vline lines. With a caption the table is placed in a #figure with a label, which you can refer to with @, e.g. @tab:my-table.

Characters with a special meaning in Typst, such as #, $, * or @, are escaped. To write Typst markup, e.g. math ($x^2$), in the cells, choose Cell text: Typst markup in the output options under the result.