w:tcPr (Table Cell Properties)
Contains formatting properties for a table cell, including width, borders, and span.
Parent elements
Child elements
Description
w:tcPr is the table cell properties container, grouping all cell-level formatting. It is defined in ECMA-376 Part 1 §17.4.70.
Common children include w:tcW (cell width), w:gridSpan (column spanning), w:vMerge (vertical merging), w:tcBorders (cell borders), w:shd (background colour), w:tcMar (cell margins), and w:vAlign (vertical text alignment).
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
| (none) | — | — | Properties are expressed exclusively through child elements. |
Examples
<w:tcPr>
<w:tcW w:w="3000" w:type="dxa"/>
<w:gridSpan w:val="2"/>
<w:shd w:val="clear" w:color="auto" w:fill="E0E0E0"/>
</w:tcPr>
new TableCellProperties(
new TableCellWidth { Width = "3000", Type = TableWidthUnitValues.Dxa },
new GridSpan { Val = 2 },
new Shading { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "E0E0E0" });