Compartilhar via


TableStyles Class

Table Styles.When the object is serialized out as xml, its qualified name is x:tableStyles.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Spreadsheet.TableStyles

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(TableStyle))> _
Public Class TableStyles _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As TableStyles
[ChildElementInfoAttribute(typeof(TableStyle))]
public class TableStyles : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • TableStyle <x:tableStyle>

[ISO/IEC 29500-1 1st Edition]

18.8.42 tableStyles (Table Styles)

This element represents a collection of Table style definitions for Table styles and PivotTable styles used in this workbook. It consists of a sequence of tableStyle records, each defining a single Table style.

A Table style is a collection of formatting that applies to structured regions of a Table or PivotTable [Example: make the header row & totals bold face, and apply light gray fill to alternating rows in the data portion of the table to achieve striped or banded rows. end example]

See the enumeration values in ST_TableStyleType for a listing of structured Table regions to which formatting can be applied, and which together make up a single Table style definition.

Parent Elements

styleSheet (§18.8.39)

Child Elements

Subclause

tableStyle (Table Style)

§18.8.40

Attributes

Description

count (Table Style Count)

Count of table styles defined in this collection.

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

defaultPivotStyle (Default Pivot Style)

Name of the default table style to apply to new PivotTables. This can be set by the user interface.

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

defaultTableStyle (Default Table Style)

Name of default table style to apply to new Tables. This can be set by the user interface.

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

[Note: The W3C XML Schema definition of this element’s content model (CT_TableStyles) is located in §A.2. 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

TableStyles Members

DocumentFormat.OpenXml.Spreadsheet Namespace