w:gridSpan (Column Span)
Specifies the number of grid columns this cell spans horizontally (for merged cells).
Parent elements
Description
w:gridSpan specifies the number of table grid columns that a cell spans. It is defined in ECMA-376 Part 1 §17.4.17.
When a cell spans multiple columns, its w:tcW should be the sum of all grid column widths it covers. The corresponding grid positions in the same row do not contain a cell element.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:val |
xsd:integer |
Positive integer ≥ 1. Default is 1 (no spanning). |
Number of grid columns the cell spans. |
Examples
<!-- Cell spanning 3 columns -->
<w:tcPr>
<w:tcW w:w="6000" w:type="dxa"/>
<w:gridSpan w:val="3"/>
</w:tcPr>
new TableCellProperties(
new TableCellWidth { Width = "6000", Type = TableWidthUnitValues.Dxa },
new GridSpan { Val = 3 });