Compartilhar via


TableProperties Class

Table Properties.When the object is serialized out as xml, its qualified name is a:tblPr.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Drawing.TableProperties

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(PatternFill))> _
<ChildElementInfoAttribute(GetType(TableStyleId))> _
<ChildElementInfoAttribute(GetType(ExtensionList))> _
<ChildElementInfoAttribute(GetType(EffectList))> _
<ChildElementInfoAttribute(GetType(NoFill))> _
<ChildElementInfoAttribute(GetType(SolidFill))> _
<ChildElementInfoAttribute(GetType(GradientFill))> _
<ChildElementInfoAttribute(GetType(BlipFill))> _
<ChildElementInfoAttribute(GetType(GroupFill))> _
<ChildElementInfoAttribute(GetType(EffectDag))> _
<ChildElementInfoAttribute(GetType(TableStyle))> _
Public Class TableProperties _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As TableProperties
[ChildElementInfoAttribute(typeof(PatternFill))]
[ChildElementInfoAttribute(typeof(TableStyleId))]
[ChildElementInfoAttribute(typeof(ExtensionList))]
[ChildElementInfoAttribute(typeof(EffectList))]
[ChildElementInfoAttribute(typeof(NoFill))]
[ChildElementInfoAttribute(typeof(SolidFill))]
[ChildElementInfoAttribute(typeof(GradientFill))]
[ChildElementInfoAttribute(typeof(BlipFill))]
[ChildElementInfoAttribute(typeof(GroupFill))]
[ChildElementInfoAttribute(typeof(EffectDag))]
[ChildElementInfoAttribute(typeof(TableStyle))]
public class TableProperties : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • NoFill <a:noFill>

  • SolidFill <a:solidFill>

  • GradientFill <a:gradFill>

  • BlipFill <a:blipFill>

  • PatternFill <a:pattFill>

  • GroupFill <a:grpFill>

  • EffectList <a:effectLst>

  • EffectDag <a:effectDag>

  • TableStyle <a:tableStyle>

  • TableStyleId <a:tableStyleId>

  • ExtensionList <a:extLst>

[ISO/IEC 29500-1 1st Edition]

21.1.3.15 tblPr (Table Properties)

This element defines the properties of a table on the whole. Within this element are many visual modifications that can be applied to the table.

[Example: Consider the following example of a tblPr within DrawingML:

<a:tblPr firstRow="1" bandRow="1">
<a:tableStyleId>{5940675A-B579-460E-94D1-54222C63F5DA}</a:tableStyleId>
</a:tblPr>

In this example, we see that there is a link to a table style id (§21.1.3.12) which is defined elsewhere and that the first column formatting and banded row formatting has been enabled. The table style defines the formatting applied with the two formatting options enabled. end example]

Parent Elements

tbl (§21.1.3.13)

Child Elements

Subclause

blipFill (Picture Fill)

§20.1.8.14

effectDag (Effect Container)

§20.1.8.25

effectLst (Effect Container)

§20.1.8.26

extLst (Extension List)

§20.1.2.2.15

gradFill (Gradient Fill)

§20.1.8.33

grpFill (Group Fill)

§20.1.8.35

noFill (No Fill)

§20.1.8.44

pattFill (Pattern Fill)

§20.1.8.47

solidFill (Solid Fill)

§20.1.8.54

tableStyle (Table Style)

§21.1.3.11

tableStyleId (Table Style ID)

§21.1.3.12

Attributes

Description

bandCol (Banded Columns)

Enables or disables the banded column formatting for a table style. A value of1 or true enables the banded column formatting defined in the table style. The attribute defaults to off if it is not specified.

[Example: Consider the following run:

<a:tblPr bandCol="1">
<a:tableStyleId>{5940675A-B579-460E-94D1-
54222C63F5DA}</a:tableStyleId>
</a:tblPr>

In this example, we can see the banded column formatting is enabled for the table. When applied, the linked table style defines the formatting for banded columns. end example]

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

bandRow (Banded Rows)

Enables or disables the banded row formatting for a table style. A value of 1 or true enables the banded row formatting defined in the table style. The attribute defaults to false if it is not specified.

[Example: Consider the following run:

<a:tblPr bandRow="1">
<a:tableStyleId>{5940675A-B579-460E-94D1-
54222C63F5DA}</a:tableStyleId>
</a:tblPr>

In this example, we can see the banded row formatting is enabled for the table. When applied, the linked table style defines the formatting for banded rows. end example]

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

firstCol (First Column)

Enables or disables the first column formatting for a table style. A value of 1 or true enables the first column formatting defined in the table style. The attribute defaults to false if it is not specified.

[Example: Consider the following run:

<a:tblPr firstCol="1">
<a:tableStyleId>{5940675A-B579-460E-94D1-
54222C63F5DA}</a:tableStyleId>
</a:tblPr>

In this example, we can see the first column formatting is enabled for the table. When applied, the linked table style defines the formatting for the first column. end example]

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

firstRow (First Row)

Enables or disables the first row formatting for a table style. A value of 1 or true enables the first row formatting defined in the table style. The attribute defaults to false if it is not specified.

[Example: Consider the following run:

<a:tblPr firstRow="1">
<a:tableStyleId>{5940675A-B579-460E-94D1-
54222C63F5DA}</a:tableStyleId>
</a:tblPr>

In this example, we can see the first row formatting is enabled for the table. When applied, the linked table style defines the formatting for the first row. end example]

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

lastCol (Last Column)

Enables or disables the last column formatting for a table style. A value of 1 or true enables the last column formatting defined in the table style. The attribute defaults to false if it is not specified.

[Example: Consider the following run:

<a:tblPr lastCol="1">
<a:tableStyleId>{5940675A-B579-460E-94D1-
54222C63F5DA}</a:tableStyleId>
</a:tblPr>

In this example, we can see the last column formatting is enabled for the table. When applied, the linked table style defines the formatting for the last column. end example]

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

lastRow (Last Row)

Enables or disables the last row formatting for a table style. A value of 1 or true enables the last row formatting defined in the table style. The attribute defaults to false if it is not specified.

[Example: Consider the following run:

<a:tblPr lastRow="1">
<a:tableStyleId>{5940675A-B579-460E-94D1-
54222C63F5DA}</a:tableStyleId>
</a:tblPr>

In this example, we can see the last row formatting is enabled for the table. When applied, the linked table style defines the formatting for the last row. end example]

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

rtl (Right-to-Left)

Defines enables the right-to-left settings of a table. If the value of rtl is 1 or true , then the table is laid out from the right-to-left rather than the default left-to-right.

[Example: Consider the following run:

<a:tblPr rtl="1">
<a:tableStyleId>{5940675A-B579-460E-94D1-
54222C63F5DA}</a:tableStyleId>
</a:tblPr>

In this example, we can see that the table is to be created in a right-to-left direction. end example]

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

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

© ISO/IEC29500: 2008.

Thread Safety

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

See Also

Reference

TableProperties Members

DocumentFormat.OpenXml.Drawing Namespace