tables

Table collection with Table/Cell elements.

tables.TableCollection

collections.tables.TableCollection(app)

doc.tables โ€” tables in document order.

tables.Table

collections.tables.Table(app, ctrl, index)

Value object for a single table control.

Attributes

Name Description
caption Caption text, or an empty string if the table has none.
cols Number of columns in the table (0 if unknown).
name Best-effort display name โ€” caption when present, else ordinal.
rows Number of rows in the table (0 if unknown).

Methods

Name Description
cell Return a :class:Cell for (row, col) (0-indexed).

cell

collections.tables.Table.cell(row, col)

Return a :class:Cell for (row, col) (0-indexed).

tables.Cell

collections.tables.Cell(app, table, row, col)

Value object for a single table cell.

Phase 4 surface: .text, .address (A1-style), .select(). Does not own a COM object โ€” addresses are passed to the HWP engine on demand.

Attributes

Name Description
address A1-style address (e.g. "B3").
text Best-effort cell text. Selects the cell, reads the saved-block

Methods

Name Description
select Navigate the caret to this cell. Selects the owning table first,

select

collections.tables.Cell.select()

Navigate the caret to this cell. Selects the owning table first, then uses SetCellAddr / TableCellBlock navigation. Returns True on success, False on any COM error.

Back to top