Table Rows - dolanmiu/Office-Open-XML-Reference GitHub Wiki
A table row is defined with the <w:tr> element.
<w:tr>
<w:tc>
<w:tcPr>
<w:tcW w:w="2880" w:type="dxa"/>
</w:tcPr>
<w:p>
<w:r>
<w:t>AAA</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="2880" w:type="dxa"/>
</w:tcPr>
<w:p>
<w:r>
<w:t>BBB</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="2880" w:type="dxa"/>
</w:tcPr>
<w:p>
<w:r>
<w:t>CCC</w:t>
</w:r>
</w:p>
</w:tc>
</w:tr>Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 17.4.79.
The <w:tr> element can contain a whole host of elements, mostly related to tracking revisions and adding custom XML. The core elements are shown below.
| Element | Description |
|---|---|
| trPr | Specifies the row-level properties for the row. These properties affect the appearance of the cells in the row but can be overridden by individual cell-level properties. See Table Row Properties. Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 17.4.82. |
| tblPrEx | Specifies table properties for the row in place of the table properties specified in tblPr. These properties are typically used for legacy documents, as well as in cases where two independent tables are merged (to prevent the properties for the second table from being superseded by those of the first table). See Table Property Exceptions.Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 17.4.61. |
| tc | Specifies a table cell. See Table Cell. Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 17.4.66. |
The tr element can have a handful of ID elements, including rsidDel, rsidR, rsidRPr, and rsidTr. They are used for tracking editing and are omitted here.
