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.)
w:rsidDel
ST_LongHexNumber
8-digit hex string
Revision save ID tracking when this row was deleted.
w:rsidTr
ST_LongHexNumber
8-digit hex string
Revision save ID tracking when this row’s properties were changed.
new TableRow(
new TableRowProperties(new TableRowHeight { Val = 360, Type = HeightRuleValues.Exact }),
new TableCell(
new TableCellProperties(new GridSpan { Val = 2 }),
new Paragraph(new Run(new Text("Spans 2 columns")))),
new TableCell(
new Paragraph(new Run(new Text("Column 3")))));
new TableRow(
new TableRowProperties(new TableHeader()),
new TableCell(
new TableCellProperties(new Shading { Fill = "D3D3D3" }),
new Paragraph(
new ParagraphProperties(new Justification { Val = JustificationValues.Center }),
new Run(new Text("Header 1")))),
new TableCell(
new TableCellProperties(new Shading { Fill = "D3D3D3" }),
new Paragraph(
new ParagraphProperties(new Justification { Val = JustificationValues.Center }),
new Run(new Text("Header 2")))));
Minimum row size: Every w:tr must contain at least one w:tc (table cell); empty rows are invalid.
Cell count consistency: While not required by ECMA-376, best practice is to ensure each row has the same number of logical cells (accounting for w:gridSpan); inconsistent row structures can confuse rendering engines.
Row properties first: When w:trPr is present, it must be the first child element; placing it after cells is invalid.
Repeat header: Use w:tblHeader in w:trPr to mark a row as a header row; it will repeat at the top of each page when the table spans pages.
Row height: Row height is specified in w:trPr/w:trHeight; type can be auto (minimum), atLeast (minimum), or exact (fixed); if not specified, row height is automatic based on content.
Cell spanning: Column spanning is controlled via w:gridSpan in the cell’s w:tcPr, not at the row level; vertical spans use w:vMerge.
Revision tracking: The rsid* attributes track which editing session inserted, deleted, or modified the row; they are informational and can be omitted by conforming producers.
Row border overrides: Cell-level borders in w:tcPr/w:tcBorders override table-level borders; this allows custom borders per row or cell.
Keep Together: Use w:cantSplit to prevent page breaks within the row; useful for multi-line header rows.
Performance: Rows with many cells (>20) or very complex cell content can impact rendering performance.
Accessibility: Use w:tblHeader to mark header rows so screen readers can announce them appropriately; ensure heading content is meaningful.
Privacy Notice
This site stores your theme preference and this acknowledgement in localStorage — no cookies, no tracking. When you use the contact form, your message is sent via Formspree (USA) to reach us.