Compartilhar via


TableStyle Class

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

Inheritance Hierarchy

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

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

Syntax

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

Remarks

The following table lists the possible child types:

  • TableStyleElement <x:tableStyleElement>

[ISO/IEC 29500-1 1st Edition]

18.8.40 tableStyle (Table Style)

This element represents a single table style definition that indicates how a spreadsheet application should format and display a table.

Each of the tableStyle elements contains a collection of tableStyleElement elements that define formatting for a particular region of the table.

Annex H contains a listing of table styles whose tableStyleElement elements are implied rather than explicitly saved in the file. In this case, a name attribute is written on the tableStyle record, but no corresponding tableStyleElement elements are written.

All of the built-in, named table styles defined in Annex D shall be supported by applications that implement table styles.

[Note: Each of the table styles is made up of a collection of formatting definitions, each of which corresponds to a particular structured region of the table. An application can decide to support these built-in types, and can also decide to define more styles, each with their own definitions. An application can also decide whether the user is allowed to customize or further define additional table styles. end note]

Parent Elements

tableStyles (§18.8.42)

Child Elements

Subclause

tableStyleElement (Table Style)

§18.8.41

Attributes

Description

count (Table Style Count)

Count of table style elements defined for this table style.

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

name (Table Style Name)

Name of this table style.

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

pivot (Pivot Style)

'True' if this table style should be shown as an available pivot table style.

Not mutually exclusive with table - both can be true.

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

table (Table)

True if this table style should be shown as an available table style.

Not mutually exclusive with pivot - both can be true.

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_TableStyle) 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

TableStyle Members

DocumentFormat.OpenXml.Spreadsheet Namespace