PivotField Class

Defines the PivotField Class.This class is only available in Office2010.When the object is serialized out as xml, its qualified name is x14:pivotField.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Office2010.Excel.PivotField

Namespace:  DocumentFormat.OpenXml.Office2010.Excel
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
Public Class PivotField _
    Inherits OpenXmlLeafElement
'Usage
Dim instance As PivotField
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
public class PivotField : OpenXmlLeafElement

Remarks

2.4.16 pivotField

Target namespace: http://schemas.microsoft.com/office/spreadsheetml/2010/main

A CT_PivotField element that specifies properties of a PivotTable ([ISO/IEC-29500-1] section 18.10) field. See Pivot Table under Extensions by Part for how this element integrates with [ISO/IEC-29500-1].

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this element.

<xsd:element name="pivotField" type="CT_PivotField"/>

See section 5.3 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).

2.6.31 CT_PivotField

Target namespace: http://schemas.microsoft.com/office/spreadsheetml/2010/main

Referenced by: pivotField

This complex type specifies additional properties of a PivotTable ([ISO/IEC-29500-1] section 18.10) field.

Attributes:

fillDownLabels : A boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies whether the PivotTable ([ISO/IEC-29500-1] section 18.10) item labels are repeated for this PivotTable ([ISO/IEC-29500-1] section 18.10) field. This attribute is ignored when compact attribute and the outline attribute of the PivotTable ([ISO/IEC-29500-1] section 18.10) field are TRUE. This attribute is ignored if the PivotTable ([ISO/IEC-29500-1] section 18.10) field is not on the PivotTable ([ISO/IEC-29500-1] section 18.10) row axis or the PivotTable ([ISO/IEC-29500-1] section 18.10) column axis. This value MUST be one of the following:

Value

Meaning

FALSE

The item labels are not repeated.

TRUE

The item labels are repeated for each nested item.

ignore : A boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies whether this PivotTable ([ISO/IEC-29500-1] section 18.10) field SHOULD<30> be ignored.

If this attribute is equal to TRUE, the ancestor CT_PivotField ([ISO/IEC-29500-4] section A.2) MUST have only the following attributes specified, and these attributes MUST have the following values:

Name

Value

compact

FALSE

dataField

TRUE

defaultSubtotal

FALSE

dragOff

FALSE

dragToCol

FALSE

dragToData

FALSE

dragToPage

FALSE

dragToRow

FALSE

includeNewItemsInFilter

TRUE

itemPageCount

FALSE

outline

FALSE

showAll

FALSE

subtotalTop

FALSE

topAutoShow

FALSE

If this attribute is equal to TRUE, there MUST exist a CT_Datafield ([ISO/IEC-29500-4] section A.2) element with a fld attribute that specifies this PivotTable ([ISO/IEC-29500-1] section 18.10) field. Additionally, that CT_DataField ([ISO/IEC-29500-4] section A.2) element MUST have a descendant CT_DataField element with a sourceField attribute specified.

For more details, see CT_DataField.

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this complex type.

<xsd:complexType name="CT_PivotField">

<xsd:attribute name="fillDownLabels" type="xsd:boolean" use="optional" default="false"/>

<xsd:attribute name="ignore" type="xsd:boolean" default="false" use="optional"/>

</xsd:complexType>

See section 5.3 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).

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

PivotField Members

DocumentFormat.OpenXml.Office2010.Excel Namespace