w:tr (Table Row)
Contains a single row of table cells and the row-level formatting properties.
Description
w:tr is a table row — a horizontal grouping of one or more table cells (w:tc). It is defined in ECMA-376 Part 1 §17.4.79.
Each row can optionally start with a w:trPr element specifying row-level properties such as height, header row flag, or row-level conditional format bands. Cells follow in document order from left to right.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:rsidR |
ST_LongHexNumber |
8-digit hex string | Revision save ID tracking when this row was inserted. (Internal bookkeeping, not displayed.) |
Examples
<w:tr>
<w:tc>
<w:p><w:r><w:t>Column 1</w:t></w:r></w:p>
</w:tc>
<w:tc>
<w:p><w:r><w:t>Column 2</w:t></w:r></w:p>
</w:tc>
</w:tr>
new TableRow(
new TableCell(new Paragraph(new Run(new Text("Column 1")))),
new TableCell(new Paragraph(new Run(new Text("Column 2")))));
Notes
- Every
w:trmust contain at least onew:tc. - Row properties such as height and repeat-header are in the
w:trPrchild element.