Adobe InDesign CS (3.0) Object Model JS: Table

InDesign CS

Class

Table

 A table.

QuickLinks

convertToText, createOutlines, remove, search, select, unmerge

Hierarchy

Cell | Character | InsertionPoint | Line | Paragraph | Story | Text | TextColumn | TextFrame | TextStyleRange | Word
Table
Button | Cell | Column | FormField | GraphicLine | Group | Oval | PageItem | Polygon | Rectangle | Row | TextFrame

Properties

PropertyTypeAccessDescription
allGraphics Array of Graphic readonlyLists all graphics contained by the Table.
allPageItems Array of PageItem readonlyLists all page items contained by the Table.
alternatingFillsAlternatingFillsTypes:
AlternatingFillsTypes.NO_ALTERNATING_PATTERN
AlternatingFillsTypes.ALTERNATING_ROWS
AlternatingFillsTypes.ALTERNATING_COLUMNS
r/wThe pattern for alternating fills.
bodyRowCountnumber r/wNumber of table body rows
bottomBorderStrokeColorSwatch r/wThe color, specified as a swatch (color, gradient, tint, or mixed ink), of the bottom border stroke.
bottomBorderStrokeGapColorSwatch r/wThe gap color, specified as a swatch (color, gradient, tint, or mixed ink), of the bottom border stroke. Note: Valid only when bottom border stroke type is not solid.
bottomBorderStrokeGapOverprintbool r/wIf true, the gap of the bottom border stroke will overprint. Note: Valid only when bottom border stroke type is not solid.
bottomBorderStrokeGapTintnumber r/wThe tint (as a percentage) of the gap color of the bottom border stroke. (Range: 0 to 100) Note: Valid only when bottom border stroke type is not solid.
bottomBorderStrokeOverprintbool r/wIf true, the bottom border stroke will overprint.
bottomBorderStrokeTintnumber r/wThe tint (as a percentage) of the bottom border stroke. (Range: 0 to 100)
bottomBorderStrokeTypeStrokeStyle r/wThe stroke type of the bottom border
bottomBorderStrokeWeightMeasurement Unit (Number or String) r/wThe stroke weight of the bottom border stroke.
breakFootersHeaderFooterBreakTypes:
HeaderFooterBreakTypes.IN_ALL_TEXT_COLUMNS
HeaderFooterBreakTypes.ONCE_PER_TEXT_FRAME
HeaderFooterBreakTypes.ONCE_PER_PAGE
r/wThe footer placement.
breakHeadersHeaderFooterBreakTypes:
HeaderFooterBreakTypes.IN_ALL_TEXT_COLUMNS
HeaderFooterBreakTypes.ONCE_PER_TEXT_FRAME
HeaderFooterBreakTypes.ONCE_PER_PAGE
r/wThe header placement.
buttonsButtons readonlyA collection of buttons.
cellsCells readonlyA collection of table cells.
columnCountnumber r/wThe number of columns
columnFillsPrioritybool r/wIf true, hides alternating row fills. If false, hides alternating column fills.
columnsColumns readonlyA collection of table columns.
contentsSpecialCharacters
String
r/wThe text contents. Can return: String or SpecialCharacters enumerator.
endColumnFillColorSwatch r/wThe fill color, specified as a swatch (color, gradient, tint, or mixed ink), of columns in the second alternating fill group. Note: Valid when alternating fills are defined for table columns.
endColumnFillCountnumber r/wThe number of columns in the second alternating fills group. Note: Valid when alternating fills are defined for table columns.
endColumnFillOverprintbool r/wIf true, the columns in the second alternating fills group will overprint. Note: Valid when alternating fills are defined for table columns.
endColumnFillTintnumber r/wThe tint (as a percentage) of the columns in the second alternating fills group. (Range: 0 to 100) Note: Valid when alternating fills are defined for table columns.
endColumnLineStyleStrokeStyle r/wThe stroke type of columns in the second alternating columns group
endColumnStrokeColorSwatch r/wThe stroke color, specified as a swatch (color, gradient, tint, or mixed ink), of column borders in the second alternating column strokes group. Note: Valid when end column stroke count is 1 or greater.
endColumnStrokeCountnumber r/wThe number of columns in the second alternating column strokes group.
endColumnStrokeGapColorSwatch r/wThe stroke gap color, specified as a swatch (color, gradient, tint, or mixed ink), of column borders in the second alternating column strokes group. Note: Valid when end column stroke count is 1 or greater.
endColumnStrokeGapOverprintbool r/wIf true, the gap of the column border stroke in the second alternating column strokes group will overprint. Note: Valid when end column stroke count is 1 or greater.
endColumnStrokeGapTintnumber r/wThe tint (as a percentage) of the gap color of column borders in the second alternating column strokes group. (Range: 0 to 100) Note: Valid when end column stroke count is 1 or greater.
endColumnStrokeOverprintbool r/wIf true, the column borders in the second alternating column strokes group will overprint. Note: Valid when end column stroke count is 1 or greater.
endColumnStrokeTintnumber r/wThe tint (as a percentage) of column borders in the second alternating column strokes group. (Range: 0 to 100) Note: Valid when end column stroke count is 1 or greater.
endColumnStrokeWeightMeasurement Unit (Number or String) r/wThe stroke weight of column borders in the second alternating column strokes group. Note: Valid when end column stroke count is 1 or greater.
endRowFillColorSwatch r/wThe fill color, specified as a swatch (color, gradient, tint, or mixed ink), of rows in the second alternating fills group. Note: Valid when alternating fills are defined for table rows.
endRowFillCountnumber r/wThe number of rows in the second alternating fills group. Note: Valid when alternating fills are defined for table rows.
endRowFillOverprintbool r/wIf true, the rows in the second alternating fills group will overprint. Note: Valid when alternating fills are defined for table rows.
endRowFillTintnumber r/wThe tint (as a percentage) of the rows in the second alternating fills group. (Range: 0 to 100) Note: Valid when alternating fills are defined for table rows.
endRowStrokeColorSwatch r/wThe stroke color, specified as a swatch (color, gradient, tint, or mixed ink), of row borders in the second alternating row strokes group. Note: Valid when end row stroke count is 1 or greater.
endRowStrokeCountnumber r/wThe number of rows in the second alternating row strokes group.
endRowStrokeGapColorSwatch r/wThe gap color, specified as a swatch (color, gradient, tint, or mixed ink), of row borders in the second alternating rows group. Note: Valid when end row stroke count is 1 or greater.
endRowStrokeGapOverprintbool r/wIf true, the gap of the row borders in the second alternating rows group will overprint. Note: Valid when end row stroke count is 1 or greater.
endRowStrokeGapTintMeasurement Unit (Number or String) r/wThe gap tint (as a percentage) of the gap color of rows in the second alternating rows group
endRowStrokeOverprintbool r/wIf true, the rows in the second alternating rows group will overprint. Note: Valid when end row stroke count is 1 or greater.
endRowStrokeTintMeasurement Unit (Number or String) r/wThe tint of the color of rows in the second alternating row strokes group
endRowStrokeTypeStrokeStyle r/wThe stroke type of rows in the second alternating row strokes group
endRowStrokeWeightMeasurement Unit (Number or String) r/wThe stroke weight of row borders in the second alternating row strokes group. Note: Valid when end row stroke count is 1 or greater.
footerRowCountnumber r/wNumber of table footer rows
formFieldsFormFields readonlyA collection of form fields.
graphicLinesGraphicLines readonlyA collection of graphic lines.
groupsGroups readonlyA collection of groups.
headerRowCountnumber r/wNumber of table header rows
heightMeasurement Unit (Number or String) r/wThe height of the Table. For a table or column, specifies the sum of the row heights.
idnumber readonlyThe unique ID of the Table.
indexnumber readonlyThe index of the Table within its containing object.
labelstring r/wA property that can be set to any string.
leftBorderStrokeColorSwatch r/wThe color, specified as a swatch (color, gradient, tint, or mixed ink), of the left border stroke.
leftBorderStrokeGapColorSwatch r/wThe gap color, specified as a swatch (color, gradient, tint, or mixed ink), of the left border stroke. Note: Valid only when left border stroke type is not solid.
leftBorderStrokeGapOverprintbool r/wIf true, the gap of the left border stroke will overprint. Note: Valid only when left border stroke type is not solid.
leftBorderStrokeGapTintnumber r/wThe tint (as a percentage) of the gap color of the left border stroke. (Range: 0 to 100) Note: Valid only when left border stroke type is not solid.
leftBorderStrokeOverprintbool r/wIf true, the left border stroke will overprint.
leftBorderStrokeTintnumber r/wThe tint (as a percentage) of the left border stroke. (Range: 0 to 100)
leftBorderStrokeTypeStrokeStyle r/wThe stroke type of the left border.
leftBorderStrokeWeightMeasurement Unit (Number or String) r/wThe stroke weight of the left border stroke.
ovalsOvals readonlyA collection of ellipses.
pageItemsPageItems readonlyThe page items collection, which can be used to process all page items in a container (such as a document, page, or group), regardless of type.
parentCell
Character
InsertionPoint
Line
Paragraph
Story
Text
TextColumn
TextFrame
TextStyleRange
Word
readonlyThe parent of the Table (a TextFrame, Text, Character, Word, Line, Paragraph, TextColumn, InsertionPoint, Story, Cell or TextStyleRange).
polygonsPolygons readonlyA collection of polygons.
propertiesObject r/wA property that allows setting of several properties at the same time.
rectanglesRectangles readonlyA collection of rectangles.
rightBorderStrokeColorSwatch r/wThe color, specified as a swatch (color, gradient, tint, or mixed ink), of the right border stroke.
rightBorderStrokeGapColorSwatch r/wThe gap color, specified as a swatch (color, gradient, tint, or mixed ink), of the right border stroke. Note: Valid only when right border stroke type is not solid.
rightBorderStrokeGapOverprintbool r/wIf true, the gap color of the right border stroke will overprint. Note: Valid only when right border stroke type is not solid.
rightBorderStrokeGapTintnumber r/wThe tint (as a percentage) of the gap color of the right border stroke. (Range: 0 to 100) Note: Valid only when right border stroke type is not solid.
rightBorderStrokeOverprintbool r/wIf true, the right border stroke will overprint.
rightBorderStrokeTintnumber r/wThe tint (as a percentage) of the right border stroke. (Range: 0 to 100)
rightBorderStrokeTypeStrokeStyle r/wThe stroke type of the table's right border.
rightBorderStrokeWeightMeasurement Unit (Number or String) r/wThe stroke weight of the right border stroke.
rowsRows readonlyA collection of table rows.
skipFirstAlternatingFillColumnsnumber r/wThe number of columns on the left side of the table to skip before applying the column fill color. Note: Valid when alternating fills are defined for table columns.
skipFirstAlternatingFillRowsnumber r/wThe number of body rows at the beginning of the table to skip before applying the row fill color. Note: Valid when alternating fills are defined for table rows.
skipFirstAlternatingStrokeColumnsnumber r/wThe number of columns on the left of the table in which to skip border stroke formatting. Note: Valid when start column stroke count is 1 or greater and/or end column stroke count is 1 or greater.
skipFirstAlternatingStrokeRowsnumber r/wThe number of body rows at the beginning of the table in which to skip border stroke formatting. Note: Valid when start row stroke count is 1 or greater and/or end row stroke count is 1 or greater.
skipFirstHeaderbool r/wIf true, skips the first occurrence of header rows.
skipLastAlternatingFillColumnsnumber r/wThe number columns on the right side of the table in which to not apply the column fill color. Note: Valid when alternating fills are defined for table columns.
skipLastAlternatingFillRowsnumber r/wThe number of body rows at the end of the table in which to not apply the row fill color. Note: Valid when alternating fills are defined for table rows.
skipLastAlternatingStrokeColumnsnumber r/wThe number of columns on the right side of the table in which to skip border stroke formatting. Note: Valid when start column stroke count is 1 or greater and/or end column stroke count is 1 or greater.
skipLastAlternatingStrokeRowsnumber r/wThe number of body rows at the end of the table in which to skip border stroke formatting. Note: Valid when start row stroke count is 1 or greater and/or end row stroke count is 1 or greater.
skipLastFooterbool r/wIf true, skips the last occurrence of footer rows.
spaceAfterMeasurement Unit (Number or String) r/wThe space below the table.
spaceBeforeMeasurement Unit (Number or String) r/wThe space above the table.
startColumnFillColorSwatch r/wThe fill color, specified as a swatch (color, gradient, tint, or mixed ink), of columns in the first alternating fills group. Note: Valid when alternating fills are defined for table columns.
startColumnFillCountnumber r/wThe number of columns in the first alternating fills group. Note: Valid when alternating fills are defined for table columns.
startColumnFillOverprintbool r/wIf true, the columns in the first alternating fills group will overprint. Note: Valid when alternating fills are defined for table columns.
startColumnFillTintnumber r/wThe tint (as a percentage) of the columns in the first alternating fills group. (Range: 0 to 100) Note: Valid when alternating fills are defined for table columns.
startColumnStrokeColorSwatch r/wThe stroke color, specified as a swatch (color, gradient, tint, or mixed ink), of column borders in the first alternating column strokes group.
startColumnStrokeCountnumber r/wThe number of columns in the first alternating column strokes group.
startColumnStrokeGapColorSwatch r/wThe stroke gap color, specified as a swatch (color, gradient, tint, or mixed ink), of column borders in the first alternating column strokes group. Note: Valid when start column stroke count is 1 or greater.
startColumnStrokeGapOverprintbool r/wIf true, the gap of the column borders in the first alternating column strokes group will overprint. Note: Valid when start column stroke count is 1 or greater.
startColumnStrokeGapTintnumber r/wThe tint (as a percentage) of the gap color of column borders in the first alternating column strokes group. (Range: 0 to 100) Note: Valid when start column stroke count is 1 or greater.
startColumnStrokeOverprintbool r/wIf true, the column borders in the first alternating column strokes group will overprint. Note: Valid when start column stroke count is 1 or greater.
startColumnStrokeTintnumber r/wThe tint (as a percentage) of column borders in the first alternating column strokes group. (Range: 0 to 100) Note: Valid when start column stroke count is 1 or greater.
startColumnStrokeTypeStrokeStyle r/wThe stroke type of columns in the first alternating columns group
startColumnStrokeWeightMeasurement Unit (Number or String) r/wThe stroke weight of column borders in the first alternating column strokes group. Note: Valid when start column stroke count is 1 or greater.
startRowFillColorSwatch r/wThe fill color, specified as a swatch (color, gradient, tint, or mixed ink), of rows in the first alternating fills group. Note: Valid when alternating fills are defined for table rows.
startRowFillCountnumber r/wThe number of rows in the first alternating fills group. Note: Valid when alternating fills are defined for table rows.
startRowFillOverprintbool r/wIf true, the rows in the first alternating fills group will overprint. Note: Valid when alternating fills are defined for table rows.
startRowFillTintnumber r/wThe tint (as a percentage) of the rows in the first alternating fills group. (Range: 0 to 100) Note: Valid when alternating fills are defined for table rows.
startRowStrokeColorSwatch r/wThe color, specified as a swatch (color, gradient, tint, or mixed ink), of row borders in the first alternating row strokes group. Note: Valid when start row stroke count is 1 or greater.
startRowStrokeCountnumber r/wThe number of rows in the first alternating row strokes group.
startRowStrokeGapColorSwatch r/wThe stroke gap color of row borders in the first alternating row strokes group, specified as a swatch (color, gradient, tint, or mixed ink). Note: Valid when start row stroke count is 1 or greater.
startRowStrokeGapOverprintbool r/wIf true, the gap color of the row border stroke in the first alternating row strokes group will overprint. Note: Valid when start row stroke count is 1 or greater.
startRowStrokeGapTintnumber r/wThe tint (as a percentage) of the gap color of row borders in the first alternating rows group. (Range: 0 to 100) Note: Valid when start row stroke count is 1 or greater.
startRowStrokeOverprintbool r/wIf true, the row borders in the first alternating row strokes group will overprint. Note: Valid when start row stroke count is 1 or greater.
startRowStrokeTintnumber r/wThe tint (as a percentage) of the borders in the first alternating row strokes group. (Range: 0 to 100) Note: Valid when start row stroke count is 1 or greater.
startRowStrokeTypeStrokeStyle r/wThe stroke type of row borders in the first alternating row strokes group. Note: Valid when start row stroke count is 1 or greater.
startRowStrokeWeightMeasurement Unit (Number or String) r/wThe stroke weight of row borders in the first alternating row strokes group. Note: Valid when start row stroke count is 1 or greater.
storyOffsetnumber readonlyThe index of the character containing the table (from the beginning of the story).
strokeOrderStrokeOrderTypes:
StrokeOrderTypes.ROW_ON_TOP
StrokeOrderTypes.COLUMN_ON_TOP
StrokeOrderTypes.BEST_JOINS
StrokeOrderTypes.INDESIGN_2_COMPATIBILITY
r/wThe order in which to display row and column strokes at corners.
tableDirectionTableDirectionOptions:
TableDirectionOptions.LEFT_TO_RIGHT_DIRECTION
TableDirectionOptions.RIGHT_TO_LEFT_DIRECTION
r/wThe direction of the the table
textFramesTextFrames readonlyA collection of text frames.
topBorderStrokeColorSwatch r/wThe color, specified as a swatch (color, gradient, tint, or mixed ink), of the table's top border stroke.
topBorderStrokeGapColorSwatch r/wThe gap color, specified as a swatch (color, gradient, tint, or mixed ink), of the table's top border stroke. Note: Valid only when top border stroke type is not solid.
topBorderStrokeGapOverprintbool r/wIf true, the gap of the top border stroke will overprint. Note: Valid only when top border stroke type is not solid.
topBorderStrokeGapTintnumber r/wThe tint (as a percentage) of the gap color of the table's top border stroke. (Range: 0 to 100) Note: Valid only when top border stroke type is not solid.
topBorderStrokeOverprintbool r/wIf true, the top border strokes will overprint.
topBorderStrokeTintnumber r/wThe tint (as a percentage) of the table's top border stroke. (Range: 0 to 100)
topBorderStrokeTypeStrokeStyle r/wThe stroke type of the table's top border.
topBorderStrokeWeightMeasurement Unit (Number or String) r/wThe stroke weight of the table's top border stroke.
widthMeasurement Unit (Number or String) r/wThe width of the Table. For a table or row, specifies the sum of the column widths.

Methods

Instances

Text convertToText ([columnSeparator: string][, rowSeparator: string])
Converts the table to text.

ParameterTypeDescription
columnSeparatorstringThe character to insert between the each column's content in the converted text. Note: Can be defined as any single character, such as a letter, number, or punctuation mark, or by typing a space or tab. Use the actual character rather than its name, such as ',' rather than 'Comma'. Precede double or single quotes or a backslash with an extra backslash as an escape character. For paragraphs, use ^p. (Optional)
rowSeparatorstringThe character to use to separate each row's content in the converted text. Note: Can be defined as any single character, such as a letter, number, or punctuation mark, or by typing a space or tab. Use the actual character rather than its name, such as , rather than Comma. Precede double or single quotes or a backslash with an extra backslash as an escape character. For paragraphs, use ^p. (Optional)

Array of PageItem createOutlines ([deleteOriginal: bool=true])
Converts text to outlines. Each line of text becomes a polygon object. When the converted text is a single letter that has no internal spaces or detached parts, the polygon contains only a single path. Note: To determine whether a font allows the creation of outlines, see allow outlines.

ParameterTypeDescription
deleteOriginalboolIf true, deletes the original text. If false, creates the outlines as separate object(s) on top of the text. (Optional) (default: true)

void remove ()
Deletes the Table.

Array of Text search ([for: string][, wholeWord: bool][, caseSensitive: bool][, replacingWith: string][, withFindAttributes: Object][, withChangeAttributes: Object])
Look for occurrences of text that matches specific criteria

ParameterTypeDescription
forstringWhat to look for (Optional)
wholeWordboolIf true, then disregard text embedded within a larger word (Optional)
caseSensitiveboolIf true, then search only for text that matches case (Optional)
replacingWithstringWhat to replace the found text with, either a string or a special character (Optional)
withFindAttributesObjectA record of find preference settings to use (Optional)
withChangeAttributesObjectA record of change preference settings to use (Optional)

void select ([existingSelection: SelectionOptions=SelectionOptions.REPLACE])
Select this object.

ParameterTypeDescription
existingSelectionSelectionOptions:
SelectionOptions.ADD_TO
SelectionOptions.REMOVE_FROM
SelectionOptions.REPLACE
How to handle the existing selection (Optional) (default: SelectionOptions.REPLACE)

Array of Cell unmerge ()
Unmerges all merged cells in the Table.

Used in:

Column Columns.add ([at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

Row Rows.add ([at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

Table Tables.add ([to: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

Return

Table Character.convertToTable ([columnSeparator: string][, rowSeparator: string][, numberOfColumns: number=1])

Table InsertionPoint.convertToTable ([columnSeparator: string][, rowSeparator: string][, numberOfColumns: number=1])

Table Line.convertToTable ([columnSeparator: string][, rowSeparator: string][, numberOfColumns: number=1])

Table Paragraph.convertToTable ([columnSeparator: string][, rowSeparator: string][, numberOfColumns: number=1])

Table Tables.add ([to: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])

Table Text.convertToTable ([columnSeparator: string][, rowSeparator: string][, numberOfColumns: number=1])

Table TextColumn.convertToTable ([columnSeparator: string][, rowSeparator: string][, numberOfColumns: number=1])

Table TextStyleRange.convertToTable ([columnSeparator: string][, rowSeparator: string][, numberOfColumns: number=1])

Table Word.convertToTable ([columnSeparator: string][, rowSeparator: string][, numberOfColumns: number=1])

Jongware, 27-Jun-2010 v3.0.3dContents :: Index