comet.table¶
This module provides factory functions for accessing and creating tables in a document.
See also
- Class
comet.CTable
Accessor for tables in a document
Methods¶
- comet.table.create(frame: CFrame, columnCount: int, rowCount: int, insertPoint: int = 0, deleteRange: int = 0, cellHeight: float = 20.0, cellWidth: float = 30.0, headerRowCount: int = 0, footerRowCount: int = 0) CTable ¶
Create a new table
Illustrator® Since tables are not inside text frames, the table is placed at the top left corner of the current artboard.
- Parameters:
frame (CFrame) –
The frame to create the table inside
Illustrator® Ignored - pass None
columnCount (int) – Number of table columns (at least 1)
rowCount (int) – Number of table rows (at least 1)
insertPoint (int) –
The text index where to insert the table
Illustrator® Ignored - pass 0
deleteRange (int) –
The number of characters to delete.
Default is
constants.kEnd
== until the text endIllustrator® Ignored - pass 0
cellHeight (float) – Height of the cells. Must be >= 4.0
cellWidth (float) – Width of the cells. Must be >= 4.0
headerRowCount (int) – Number of header rows. Must be >= 0
footerRowCount (int) – Number of footer rows. Must be >= 0
- Returns:
The new table on success
- Return type:
- Raises:
TypeError – When parameter types are invalid
ValueError – When parameter rows, columns or insertPoint is invalid
CometError – When table could not be created
- Available:
InDesign® comet_pdf® Illustrator®
- CScript:
- comet.table.find(document: CDocument = None, pages: list[int] = [], frames: list[CFrame] = []) list[CTable] ¶
Find tables in the document
- Parameters:
- Returns:
The found tables
- Return type:
- Raises:
TypeError – When parameter types are invalid
ValueError – When parameter frames or pages contain invalid types
CometError – On internal error
- Available:
InDesign® comet_pdf® Illustrator®
- Examples:
Get the first table of the script frame and write it into the logfile.