Table appearance

Set a table’s overall properties and the strokes around and between its cells.

VisualProperties

class creator_studio_doc_format.core.VisualProperties(*, preset_identifier='', overall_properties=None, body_cell_properties=None, body_text_properties=None, body_stroke_properties=None, header_row_cell_properties=None, header_row_text_properties=None, header_row_stroke_properties=None, header_column_cell_properties=None, header_column_text_properties=None, header_column_stroke_properties=None, footer_row_cell_properties=None, footer_row_text_properties=None, footer_row_stroke_properties=None, **extra_data)[source]

The default styling of a table, broken down by region.

It holds one set of table-wide settings, overall_properties, plus paired cell, text, and stroke settings for the body and for each header and footer region. A header or footer region’s settings override the body defaults; per-row, per-column, and per-cell overrides take precedence over everything here.

field overall_properties : OverallProperties | None = None

The table-wide style settings, which include alternating-row fill, writing direction, auto-resize, rounded corners, and other settings for the whole table. Strokes are set in each region’s stroke properties (body_stroke_properties and its header-row, header-column, and footer-row counterparts), and cell settings in the matching cell properties.

field body_cell_properties : CellProperties | None = None

The default cell styling (fill, alignment, padding, and wrap) applied to body cells: the cells outside the header rows, header columns, and footer rows.

field body_text_properties : ParagraphProperties | None = None

The default paragraph and text style (font, size, color, and alignment) applied to body cells.

field body_stroke_properties : BodyStrokeProperties | None = None

The outer borders and interior gridlines of the body region, and their visibility toggles.

field header_row_cell_properties : CellProperties | None = None

The default cell styling for header rows. It overrides body_cell_properties for the cells in the top Table.number_of_header_rows rows.

field header_row_text_properties : ParagraphProperties | None = None

The default text style for header rows. It overrides body_text_properties for the cells in the top Table.number_of_header_rows rows.

field header_row_stroke_properties : HeaderFooterStrokeProperties | None = None

The outer border, body separator, and interior gridlines of the header-rows region, plus visibility toggles.

field header_column_cell_properties : CellProperties | None = None

The default cell styling for header columns. It overrides body_cell_properties for the cells in the leading Table.number_of_header_columns columns.

field header_column_text_properties : ParagraphProperties | None = None

The default text style for header columns. It overrides body_text_properties for the cells in the leading Table.number_of_header_columns columns.

field header_column_stroke_properties : HeaderFooterStrokeProperties | None = None

The outer border, body separator, and interior gridlines of the header-columns region, plus visibility toggles.

field footer_row_cell_properties : CellProperties | None = None

The default cell styling for footer rows. It overrides body_cell_properties for the cells in the bottom Table.number_of_footer_rows rows.

field footer_row_text_properties : ParagraphProperties | None = None

The default text style for footer rows. It overrides body_text_properties for the cells in the bottom Table.number_of_footer_rows rows.

field footer_row_stroke_properties : HeaderFooterStrokeProperties | None = None

The outer border, body separator, and interior gridlines of the footer-rows region, plus visibility toggles.

OverallProperties

class creator_studio_doc_format.core.OverallProperties(*, preset_identifier='', behaves_like_spreadsheet=None, auto_resize=None, writing_direction=None, has_alternating_rows=None, alternating_rows_fill=Override.not_set(), rounded_corners=None, stroke_presets=None, **extra_data)[source]

The style settings that apply to a whole table.

A preset_identifier here is matched against the overall style of each table style collection in the document stylesheet by the numeric slot in the identifier rather than by the whole string, so an identifier not in that form resolves to the first slot. When no collection matches, the first table style in the stylesheet is used.

field behaves_like_spreadsheet : bool | None = None

Whether the table uses spreadsheet-style interaction (cell selection, navigation, and fill handles). Keynote writes false; when no value is given, true is used.

field auto_resize : bool | None = None

Whether the table grows and shrinks to fit its content rather than keeping fixed row and column sizes.

field writing_direction : WritingDirectionType | None = None

The default writing direction for the table (left-to-right, right-to-left, or natural).

field has_alternating_rows : bool | None = None

Whether every other body row is filled with alternating_rows_fill to produce a banded look.

field alternating_rows_fill : Override[Fill] = Override.not_set()

The fill applied to alternating body rows when has_alternating_rows is true. If it’s absent, it’s inherited; an explicit null leaves the alternating rows unfilled, which isn’t the same as a fill at 0% opacity.

field rounded_corners : bool | None = None

Whether the table outline uses rounded corners. Keynote always writes false and ignores the value when it reads a document.

field stroke_presets : list[StrokePreset] | None = None

The border and gridline stroke presets available for this table, in order. They are choices that can be applied, not a description of the table’s borders and gridlines. A list shorter than 15 entries is padded with generated presets, and a longer one is truncated.

StrokePreset

class creator_studio_doc_format.core.StrokePreset(*, preset_identifier='', horizontal_stroke=None, vertical_stroke=None, exterior_stroke=None, visible_edges=None, **extra_data)[source]

One of a table’s stroke presets.

Applying the preset strokes each edge listed in visible_edges and clears every edge not listed. Interior edges take horizontal_stroke or vertical_stroke, and outer edges take exterior_stroke.

field horizontal_stroke : Stroke | None = None

The stroke applied to the interior horizontal gridlines this preset turns on.

field vertical_stroke : Stroke | None = None

The stroke applied to the interior vertical gridlines this preset turns on.

field exterior_stroke : Stroke | None = None

The stroke applied to the outer border edges this preset turns on.

field visible_edges : list[Annotated[Edge, Strict(False)]] | None = None

The edges this preset strokes; every edge left out is cleared when the preset is applied. Order isn’t meaningful and each edge must appear at most once. An empty list is the no borders preset.

Edge

class creator_studio_doc_format.core.Edge(str, Enum)[source]

An edge of the stroked range that a stroke preset can turn on.

The four outer edges are stroked with exterior_stroke; the two interior cases are stroked with horizontal_stroke and vertical_stroke.

A field accepts a member or its value, so Edge.BOTTOM and 'bottom' are the same. The member’s name as a string isn’t accepted.

BOTTOM = 'bottom'

Outer bottom edge.

HORIZONTAL = 'horizontal'

Interior horizontal gridlines (between rows).

LEFT = 'left'

Outer left edge.

RIGHT = 'right'

Outer right edge.

TOP = 'top'

Outer top edge.

VERTICAL = 'vertical'

Interior vertical gridlines (between columns). Shown in Keynote as “Center borders.”

BodyStrokeProperties

class creator_studio_doc_format.core.BodyStrokeProperties(*, preset_identifier='', horizontal_border_stroke=None, vertical_border_stroke=None, horizontal_stroke=None, vertical_stroke=None, border_strokes_visible=None, horizontal_strokes_visible=None, vertical_strokes_visible=None, **extra_data)[source]

The borders and gridlines of a table’s body region, and their visibility.

field horizontal_border_stroke : Stroke | None = None

The outer top and bottom borders of the body region.

field vertical_border_stroke : Stroke | None = None

The outer left and right borders of the body region.

field horizontal_stroke : Stroke | None = None

The horizontal gridlines between body rows (interior only; the outer borders are horizontal_border_stroke).

field vertical_stroke : Stroke | None = None

The vertical gridlines between body columns (interior only; the outer borders are vertical_border_stroke).

field border_strokes_visible : bool | None = None

Whether the body’s outer border strokes (horizontal_border_stroke and vertical_border_stroke) are visible. It’s the main visibility setting for both.

field horizontal_strokes_visible : bool | None = None

Whether the body’s horizontal gridlines are visible. It’s their main visibility setting.

field vertical_strokes_visible : bool | None = None

Whether the body’s vertical gridlines are visible. It’s their main visibility setting.

HeaderFooterStrokeProperties

class creator_studio_doc_format.core.HeaderFooterStrokeProperties(*, preset_identifier='', border_stroke=None, separator_stroke=None, horizontal_stroke=None, vertical_stroke=None, separator_visible=None, across_strokes_visible=None, **extra_data)[source]

The borders, gridlines, and visibility toggles of a table’s header or footer region.

The same type is used for header rows, header columns, and footer rows; the region it describes depends on which of the table’s visual properties holds it.

field border_stroke : Stroke | None = None

The outer border around the region.

field separator_stroke : Stroke | None = None

The stroke that separates this region from the adjacent body.

field horizontal_stroke : Stroke | None = None

The horizontal gridlines between cells inside the region.

field vertical_stroke : Stroke | None = None

The vertical gridlines between cells inside the region.

field separator_visible : bool | None = None

Whether separator_stroke is visible.

field across_strokes_visible : bool | None = None

Whether the strokes that run across the region are visible: the vertical strokes for header and footer rows, and the horizontal strokes for header columns.