w:tblStyle (Table Style Reference)
References a named table style by its styleId, applying all formatting of that style to the table.
Parent elements
Description
w:tblStyle references a table style by its styleId, applying all table, row, and cell properties defined in that style. It is defined in ECMA-376 Part 1 §17.4.62.
Table styles can define conditional formatting bands (first row, last row, banded rows, first column, etc.) controlled by w:tblLook. Built-in table style IDs include TableGrid, LightList, MediumShading1Accent1, etc.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:val |
ST_String |
The styleId of any table style defined in the document’s styles.xml. |
References the table style to apply. |
Examples
<w:tblPr>
<w:tblStyle w:val="TableGrid"/>
</w:tblPr>
new TableProperties(
new TableStyle { Val = "TableGrid" });