Read an existing table’s style
get_table_styleRead a Google Docs table's column widths, pinned header rows, and a cell's padding, background, and borders. Use it to verify styling changes, preserve formatting during edits, or copy a table's layout elsewhere.
Instructions
Read the style of the table containing the given cell text: per-column widths (points), how many header rows are pinned, and the matched cell’s padding, background and per-side borders. The read counterpart to set_table_style — use it to check a change took, to preserve a table’s look while rewriting it, or to copy one table’s layout onto another. Column widths come back in the exact shape set_table_style accepts. Table-wide facts (widths, header rows) are reported for the whole table; padding/background/borders are reported for the MATCHED cell, since cells in one table can differ and a table-wide answer would have to guess. Note Docs gives every cell 5pt padding by default, so padding is reported even on a table nobody has styled.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab | No | Target a specific tab by tabId or title (from list_tabs). Defaults to the first tab. | |
| cell | Yes | text of any cell in the target table (locates the table) | |
| page | No | which header/footer, when a doc defines more than one (default-page, first-page, even-page). Omit to use whichever exists. | |
| account | No | Google account email to use. Defaults to GDOCS_DEFAULT_ACCOUNT, or the sole account. | |
| segment | No | which content tree to target: body (default), or the page header/footer. Header/footer content is invisible to a body read — a letterhead logo lives there. | |
| documentId | Yes |