paged.IDML Reference
Tables

Rows, columns, and cells

The Row, Column and Cell children of a table — track sizes, AutoGrow and KeepWithNextRow, the column:row address, merged cells, insets, fills and strokes.

Tier: ProProIIIreference

A table's <Row> and <Column> children size its tracks; its <Cell> children hold the content and most of the formatting.

In short A <Column> carries a width. A <Row> carries a height, a minimum and maximum, and whether it grows with its content (AutoGrow) or must stay with the next row (KeepWithNextRow). Both are named by their zero-based index. A <Cell> names its grid position as Name="column:row", can span rows and columns to merge, holds ordinary paragraphs, and carries its own insets, fill, edge strokes, vertical justification, rotation and diagonal lines.

A three-row, two-column table: <Row> and <Column> give the tracks, and each <Cell> holds a one-word paragraph.

Stories/Story_ustory.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<idPkg:Story xmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging" DOMVersion="20.0">
  <Story Self="ustory">
    <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
      <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
        <Table Self="utable" HeaderRowCount="1" FooterRowCount="0" BodyRowCount="2" ColumnCount="2"
               AppliedTableStyle="TableStyle/$ID/[Basic Table]"
               TopBorderStrokeColor="Color/Black" TopBorderStrokeWeight="1"
               BottomBorderStrokeColor="Color/Black" BottomBorderStrokeWeight="1"
               LeftBorderStrokeColor="Color/Black" LeftBorderStrokeWeight="1"
               RightBorderStrokeColor="Color/Black" RightBorderStrokeWeight="1">
          <Row Self="urow0" Name="0" SingleRowHeight="24"/>
          <Row Self="urow1" Name="1" SingleRowHeight="24"/>
          <Row Self="urow2" Name="2" SingleRowHeight="24"/>
          <Column Self="ucol0" Name="0" SingleColumnWidth="120"/>
          <Column Self="ucol1" Name="1" SingleColumnWidth="120"/>
          <Cell Self="ucell00" Name="0:0" RowSpan="1" ColumnSpan="1"
                TextTopInset="2" TextLeftInset="3" TextBottomInset="2" TextRightInset="3"
                AppliedCellStyle="CellStyle/$ID/[None]" FillColor="Color/Black"
                BottomEdgeStrokeColor="Color/Black" BottomEdgeStrokeWeight="1"
                RightEdgeStrokeColor="Color/Black" RightEdgeStrokeWeight="1">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
              <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
                <Content>Item</Content>
              </CharacterStyleRange>
            </ParagraphStyleRange>
          </Cell>
          <Cell Self="ucell10" Name="1:0" RowSpan="1" ColumnSpan="1"
                TextTopInset="2" TextLeftInset="3" TextBottomInset="2" TextRightInset="3"
                AppliedCellStyle="CellStyle/$ID/[None]" FillColor="Color/Black"
                BottomEdgeStrokeColor="Color/Black" BottomEdgeStrokeWeight="1">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
              <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
                <Content>Qty</Content>
              </CharacterStyleRange>
            </ParagraphStyleRange>
          </Cell>
          <Cell Self="ucell01" Name="0:1" RowSpan="1" ColumnSpan="1"
                TextTopInset="2" TextLeftInset="3" TextBottomInset="2" TextRightInset="3"
                AppliedCellStyle="CellStyle/$ID/[None]"
                BottomEdgeStrokeColor="Color/Black" BottomEdgeStrokeWeight="1"
                RightEdgeStrokeColor="Color/Black" RightEdgeStrokeWeight="1">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
              <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
                <Content>Paper</Content>
              </CharacterStyleRange>
            </ParagraphStyleRange>
          </Cell>
          <Cell Self="ucell11" Name="1:1" RowSpan="1" ColumnSpan="1"
                TextTopInset="2" TextLeftInset="3" TextBottomInset="2" TextRightInset="3"
                AppliedCellStyle="CellStyle/$ID/[None]"
                BottomEdgeStrokeColor="Color/Black" BottomEdgeStrokeWeight="1">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
              <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
                <Content>12</Content>
              </CharacterStyleRange>
            </ParagraphStyleRange>
          </Cell>
          <Cell Self="ucell02" Name="0:2" RowSpan="1" ColumnSpan="1"
                TextTopInset="2" TextLeftInset="3" TextBottomInset="2" TextRightInset="3"
                AppliedCellStyle="CellStyle/$ID/[None]"
                RightEdgeStrokeColor="Color/Black" RightEdgeStrokeWeight="1">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
              <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
                <Content>Toner</Content>
              </CharacterStyleRange>
            </ParagraphStyleRange>
          </Cell>
          <Cell Self="ucell12" Name="1:2" RowSpan="1" ColumnSpan="1"
                TextTopInset="2" TextLeftInset="3" TextBottomInset="2" TextRightInset="3"
                AppliedCellStyle="CellStyle/$ID/[None]">
            <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
              <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
                <Content>4</Content>
              </CharacterStyleRange>
            </ParagraphStyleRange>
          </Cell>
        </Table>
      </CharacterStyleRange>
    </ParagraphStyleRange>
  </Story>
</idPkg:Story>

Columns

Attribute · ColumnValuesPagedpaged.set
Nameintegerread · written
SingleColumnWidthlength (pt)read · writtencolumns[i].width
Selected attributes. All 8 attributes of Column →

Columns are listed left to right. Name is the column's zero-based index, the first half of a cell's address, and SingleColumnWidth its width in points.

Rows

Attribute · RowValuesPagedpaged.set
Nameintegerread · written
SingleRowHeightlength (pt)read · writtenrows[i].height
MinimumHeightinteger / realread · written
AutoGrowfalseread · written
Selected attributes. All 10 attributes of Row →

Rows are listed top to bottom across all regions: header rows first, then body, then footer. Name is the row's zero-based index across the whole table. With AutoGrow on (the default), a row is at least MinimumHeight tall and grows to fit its tallest cell, up to MaximumHeight. With AutoGrow="false" the row stays at its set height whatever its cells hold, and text that does not fit a cell is overset in that cell.

KeepWithNextRow="true" keeps a row in the same frame as the row after it, so a table never breaks between them. StartRow forces a row to begin in the next column, frame or page.

In Paged: row heights, AutoGrow and KeepWithNextRow are honoured, matched against InDesign: a fixed row keeps its height and oversets the lines that do not fit. StartRow is not read yet. Supported · verified

Cells

Address and span

Attribute · CellValuesPagedpaged.set
Nametextread · written
RowSpannumber (count)read · writtenrowSpan
ColumnSpannumber (count)read · writtencolumnSpan
AppliedCellStyleCellStyle referenceread · writtenappliedCellStyle
Selected attributes. All 63 attributes of Cell →

Name is the cell's address: column index, a colon, row index, both zero-based, so the cell in column 1 of row 0 is Name="1:0". InDesign lists cells column by column, but the address, not the order, places a cell. A cell with ColumnSpan="2" covers its own column and the next; a cell with RowSpan="3" covers its row and the two below. The positions it covers have no <Cell> of their own.

In Paged: spans are honoured. A row-spanning cell that needs more height than its rows give adds the shortfall to the last row it spans. Supported · verified

Insets and text

A cell's content is ordinary text: one or more <ParagraphStyleRange> children, with their own <Br/> marks, exactly as in a story. A cell can even hold a table.

Attribute · CellValuesPagedpaged.set
TextTopInsetlength (pt)read · writtencellInsetTop
TextLeftInsetlength (pt)read · writtencellInsetLeft
TextBottomInsetlength (pt)read · writtencellInsetBottom
TextRightInsetlength (pt)read · writtencellInsetRight
VerticalJustificationTopAlign | CenterAlign | BottomAlign | JustifyAlignread · writtencellVerticalJustification
RotationAngleintegerread · written
MinimumFirstBaselineOffsetintegerread
ClipContentToCellfalsenot read
Selected attributes. All 63 attributes of Cell →

The four insets pad the text from the cell's edges. VerticalJustification places the text (TopAlign, CenterAlign, BottomAlign, JustifyAlign). RotationAngle turns the content by 90, 180 or 270 degrees; the borders and fill do not turn. FirstBaselineOffset and MinimumFirstBaselineOffset place the first line, as in a text frame. ClipContentToCell clips content that overflows the cell.

In Paged: a cell is composed like a small text frame. Insets come from the cell's own attributes, not from its cell style. Vertical justification and rotation are applied. The first line is placed one ascent below the top inset, and each later paragraph one leading below the one before; a cell's FirstBaselineOffset is read but not used yet.

Supported · verified Supported · verified Supported · verified

Fill and edge strokes

Attribute · CellValuesPagedpaged.set
FillColorColor / Swatch referenceread · writtencellFillColor
FillTintintegernot read
TopEdgeStrokeColorColor / Swatch referenceread · writtencellTopEdgeStrokeColor
TopEdgeStrokeWeightlength (pt)read · writtencellTopEdgeStrokeWeight
TopEdgeStrokeTintnumber (percent)read · writtencellTopEdgeStrokeTint
TopEdgeStrokeTypeStrokeStyle referenceread · written
TopEdgeStrokeGapColorColor referencenot read
Selected attributes. All 63 attributes of Cell →

FillColor and FillTint paint the cell's background. Each edge (Top…, Bottom…, Left…, Right…) has a colour, weight, tint, stroke type and gap colour. When a table style's dividers apply, InDesign writes the resulting stroke on each cell's matching edge, so these edge attributes are what most often draws a table's grid. A value on the cell wins over its cell style.

In Paged: the fill colour and the edge strokes are drawn, each edge in its stroke style (a double line as two rules, dotted styles as dots, other styles solid). A cell's FillTint is not modelled: a tinted fill shows at 100 %. Edge gap colours are not painted.

Supported · verified

Diagonal lines

LeftLineDrawn draws the diagonal from the top-left to the bottom-right corner and RightLineDrawn the one from top-right to bottom-left, each with its own …StrokeColor, …StrokeWeight and …StrokeTint. DiagonalLineInFront puts the lines over the content instead of behind it.

In Paged: diagonal lines are drawn with their tints and front or back order.

Supported · verified

Frequently asked questions

How does a <Cell> know its grid position? From Name="column:row", both zero-based. The order in which cells are listed does not matter.

How are merged cells written? As one <Cell> with RowSpan or ColumnSpan above 1. The grid positions it covers have no cell element of their own.

What does AutoGrow="false" do? It fixes the row at its set height. Text that does not fit a cell in that row is overset in the cell instead of making the row taller.

Where does a cell's padding come from? From its TextTopInset, TextLeftInset, TextBottomInset and TextRightInset attributes, or from its cell style's insets when the cell sets none.

On this page