A Table object represents a single table. Tables are always contained inside a Text object in which they appear (eg: main document body). Tables can be obtained using the following commands:
Table Type Commands
Returns the first Table object in the active document’s selection, or the @undefined value if no table is selected. See the command TableSelection.active for details on whether or not a table is selected.
Table.selectedTables v3.0
Returns an array of all Table objects in the active document’s selection, or the @undefined value if no tables are selected. See the command TableSelection.active for details on whether or not a table is selected.
Table Object Properties
.rowCount v1.1
Returns the number of rows in the table. This property is read-only.
.columnCount v1.1
Returns the number of columns in the table. This property is read-only.
.enclosingText v1.1
Returns the Text object in which the table resides, eg: main document body, header, footnote, etc. Tables cannot be nested, so this text object is never a table cell. Read-only.
Note: the returned text object follows reference semantics, eg: changes to it will change the contents of the document itself.
.enclosingTextRange v1.1
Returns a Range object that specifies where in the enclosing text the table resides. Read-only.
.alignment v2.0.7
Returns one of the following three strings representing the alignment: "left", "right", or "center". If you try to set the alignment to an invalid name, it is ignored.
Table Object Commands
.cellAtRowAndColumn rowIndex, columnIndex v2.0.5
Returns a TableCell object for the given row and column coordinates, which are zero-based. If either coordinate is not in-bounds, an error will be displayed.
Note: the returned object follows reference semantics, ie: changes to it will change the table itself. However, the cell will always refer to the original row/column given, even if subsequent cell insertions or deletions are made to the table.
.userHeightAtRow rowIndex v2.0.5
Returns the user controllable minimum height for the given row. This may not be the actual visible height, which may be larger due to layout constraints (eg: text in cell is taller).
.setUserHeightAtRow rowIndex, newHeight v2.0.5
Sets the user controllable minimum height for the given row.
.userWidthAtColumn columnIndex v2.0.5
Returns the user controllable maximum width for the given column. This may not be the actual visible width, which may be smaller due to layout constraints (eg: document is not wide enough).
.setUserWidthAtColumn columnIndex, newWidth v2.0.5
Sets the user controllable maximum width for the given column.
.textAtRowAndColumn rowIndex, columnIndex v1.1
Returns a Text object that holds the content found at the given row and column coordinates, which are zero-based. If either coordinate is not in-bounds, an error will be displayed.
Note: the returned text object follows reference semantics, ie: changes to it will change the contents of the document itself.
Previous Chapter Table Objects |
<< index >> |
Next Chapter TableCell Object |