TablePropertyExceptions class

Office 2013 and later

Table-Level Property Exceptions. When the object is serialized out as xml, its qualified name is w:tblPrEx.

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Wordprocessing.TablePropertyExceptions

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

[ChildElementInfoAttribute(typeof(TableWidth))]
[ChildElementInfoAttribute(typeof(TableJustification))]
[ChildElementInfoAttribute(typeof(TableCellSpacing))]
[ChildElementInfoAttribute(typeof(TableIndentation))]
[ChildElementInfoAttribute(typeof(TableBorders))]
[ChildElementInfoAttribute(typeof(Shading))]
[ChildElementInfoAttribute(typeof(TableLayout))]
[ChildElementInfoAttribute(typeof(TableCellMarginDefault))]
[ChildElementInfoAttribute(typeof(TableLook))]
[ChildElementInfoAttribute(typeof(TablePropertyExceptionsChange))]
public class TablePropertyExceptions : OpenXmlCompositeElement

[ISO/IEC 29500-1 1st Edition]

tblPrEx (Table-Level Property Exceptions)

This element specifies a set of table properties which shall be applied to the contents of this row in place of the table properties specified in the tblPr element.

[Note: These properties are typically used in cases involving legacy documents, as well as cases where two existing independent tables are merged (in order to prevent the look of the second table from being superseded by the first table). end note]

[Example: Consider the following two tables in a WordprocessingML document:

These two tables each have a different set of table level borders. If the interceding paragraphs between these two tables is removed and the tables are merged together, it is obviously undesirable to have the second table lose its formatting and match the properties of the first table. Therefore, when the tables are merged as follows (note that there is now only one table):

The resulting WordprocessingML for the last three rows of the table would include the following set of table-level property exceptions:

<w:tr>
  <w:tblPrEx>
    <w:tblBorders>
      <w:top w:val="thinThickThinMediumGap" w:sz="24" w:space="0" w:color="auto"/>
      <w:left w:val="thinThickThinMediumGap" w:sz="24" w:space="0" w:color="auto"/>
      <w:bottom w:val="thinThickThinMediumGap" w:sz="24" w:space="0" w:color="auto"/>
      <w:right w:val="thinThickThinMediumGap" w:sz="24" w:space="0" w:color="auto"/>
      <w:insideH w:val="thinThickThinMediumGap" w:sz="24" w:space="0" w:color="auto"/>
      <w:insideV w:val="thinThickThinMediumGap" w:sz="24" w:space="0" w:color="auto"/>
    </w:tblBorders>
  </w:tblPrEx>
  …</w:tr>

The tblPrEx element contains all table-level properties which are being overridden for the current row in the table. end example]

Parent Elements

tr (§17.4.79)

Child Elements

Subclause

jc (Table Alignment Exception)

§17.4.27

shd (Table Shading Exception)

§17.4.31

tblBorders (Table Borders Exceptions)

§17.4.40

tblCellMar (Table Cell Margin Exceptions)

§17.4.42

tblCellSpacing (Table Cell Spacing Exception)

§17.4.45

tblInd (Table Indent from Leading Margin Exception)

§17.4.52

tblLayout (Table Layout Exception)

§17.4.54

tblLook (Table Style Conditional Formatting Settings Exception)

§17.4.55

tblPrExChange (Revision Information for Table-Level Property Exceptions)

§17.13.5.35

tblW (Preferred Table Width Exception)

§17.4.65

[Note: The W3C XML Schema definition of this element’s content model (CT_TblPrEx) is located in §A.1. end note]

© ISO/IEC29500: 2008.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: