Compartir a través de


TableStyleElement Class

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

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Spreadsheet.TableStyleElement

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

Syntax

'Declaración
Public Class TableStyleElement _
    Inherits OpenXmlLeafElement
'Uso
Dim instance As TableStyleElement
public class TableStyleElement : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 1ª edición]

18.8.41 tableStyleElement (Table Style)

This element specifies formatting for one area of a table or PivotTable. Together the sequence of these elements makes up one entire Table style or PivotTable style definition.

The order in which table style element formatting is applied is as follows:

Table Style Element Order

  • Whole Table

  • First Column Stripe

  • Second Column Stripe

  • First Row Stripe

  • Second Row Stripe

  • Last Column

  • First Column

  • Header Row

  • Total Row

  • First Header Cell

  • Last Header Cell

  • First Total Cell

  • Last Total Cell

For instance, row stripe formatting 'wins' over column stripe formatting, and both 'win' over whole table formatting.

PivotTable Style Element Order

  • Whole Table

  • Page Field Labels

  • Page Field Values

  • First Column Stripe

  • Second Column Stripe

  • First Row Stripe

  • Second Row Stripe

  • First Column

  • Header Row

  • First Header Cell

  • Subtotal Column 1

  • Subtotal Column 2

  • Subtotal Column 3

  • Blank Row

  • Subtotal Row 1

  • Subtotal Row 2

  • Subtotal Row 3

  • Column Subheading 1

  • Column Subheading 2

  • Column Subheading 3

  • Row Subheading 1

  • Row Subheading 2

  • Row Subheading 3

  • Grand Total Column

  • Grand Total Row

Parent Elements

tableStyle (§18.8.40)

Attributes

Description

dxfId (Formatting Id)

Zero-based index to a dxf record in the dxfs collection, specifying differential formatting to use with this Table or PivotTable style element.

The possible values for this attribute are defined by the ST_DxfId simple type (§18.18.25).

size (Band Size)

Number of rows or columns in a single band of striping. Applies only when type is firstRowStripe, secondRowStripe, firstColumnStripe, or secondColumnStripe.

[Example:

In this example, the firstRowStripe size is set to 2, and the secondRowStripe size is set to 1:

DocumentFormat.OpenXml.Spreadsheet.TableStyleEleme

end example]

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

type (Table Style Type)

Identifies this table style element's type.

The possible values for this attribute are defined by the ST_TableStyleType simple type (§18.18.77).

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

© ISO/IEC29500: 2008. Los extractos anteriores han sido traducidos del inglés al español por Microsoft (o algunos de sus agentes) e ISO no asume ningún tipo de responsabilidad por dichas traducciones.

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

TableStyleElement Members

DocumentFormat.OpenXml.Spreadsheet Namespace