Skip to main content
page.table builds a table element. You define the columns up front, add rows of cells, then add the table to the page. Each cell is plain string content or an object with content and a style.

Table options

number | number[]
required
An equal count, or an array of absolute widths in points where 0 means auto width. For example columns: [180, 0, 100] sets two fixed columns with one auto column between them.
ColorLike
The color of the cell borders.
number
The thickness of the cell borders.
number
The padding inside every cell.
StyleProperties
The style applied to the first row, which is treated as the header.
StyleProperties
The default style applied to body cells.

Adding rows

Build rows with table.add_row. The first row added receives header_style.

A complete table

This low level table takes plain string cell content. For rich inline cells with bold text, links, and inline formulas, use the Doc API table.

Layout

Arrange tables and other elements with containers.

Themes

Centralize colors used in cell and header styles.