PivotSelection Class

PivotTable Selection.When the object is serialized out as xml, its qualified name is x:pivotSelection.

Inheritance Hierarchy

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

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

Syntax

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

Remarks

The following table lists the possible child types:

  • PivotArea <x:pivotArea>

[ISO/IEC 29500-1 1st Edition]

18.3.1.69 pivotSelection (PivotTable Selection)

A collection of PivotTable structure selections. A PivotTable structure selection is a way of specifying what cells in the PivotTable are selected. Instead of specifying cell addresses in a sqref, a particular area or structure within the PivotTable is specified. In this way there is semantic meaning regarding what is selected, rather than simply a list of cell or ranges contained in the selection. Typically fields on the row or column axis are selected.

[Example:For example, the innermost field (Product SubCategory) is selected in this PivotTable:

DocumentFormat.OpenXml.Spreadsheet.PivotSelection-

The corresponding pivotSelection XML should look like this:

<pivotSelection pane="bottomRight" showHeader="1" axis="axisRow" dimension="2"
activeRow="11" activeCol="1" previousRow="11" previousCol="1" click="1"
r:id="rId1">
  <pivotArea dataOnly="0" labelOnly="1" fieldPosition="0">
<references count="1">
<reference field="9" count="0"/>
</references>
</pivotArea>
</pivotSelection>

axis indicates that this selection is on the row axis, dimension indicates the field level within the row axis that is selected (zero-based index), activeCol and activeRow respectively indicate where in the grid the selection is located, and reference field indicates to which particular field the selection corresponds.

end example]

Parent Elements

sheetView (§18.3.1.87)

Child Elements

Subclause

pivotArea (Pivot Area)

§18.3.1.68

Attributes

Description

activeCol (Active Column)

The column (zero-based) of active cell for structure selection.

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

activeRow (Active Row)

The row (zero-based) of active cell for structure selection.

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

axis (Axis)

Axis of the PivotTable on which this selection lies.

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

click (Click Count)

Number of clicks for this structure selection. For some selection combinations, subsequent clicks on the same target area cycles the actual selection through some variances. Therefore number of clicks on the selection shall be recorded, if it is desirable to restore this state of the selection cycle on load.

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

count (Selection Count)

Number of selections for the structure selection.

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

data (Data Selection)

Flag indicating whether the structure selection is for data only.

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

dimension (Dimension)

Indicates the field level within the axis that is selected (zero-based index).

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

extendable (Extendable)

Flag indicating whether the structure selection can have additional selections added to it.

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

id (Relationship Id)

Namespace: .../officeDocument/2006/relationships

Relationship Id pointing to the particular PivotTable Part corresponding to this selection.

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

label (Label)

Flag indicating whether the structure selection is for labels only (e.g., a grand total row is selected).

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

max (Maximum)

The maximum line the structure selection contains.

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

min (Minimum)

The minimum line the structure selection contains.

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

pane (Pane)

The pane to which this PivotTable structure selection belongs.

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

previousCol (Previous Column Selection)

1-based index to the column immediately left of the structure selection.

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

previousRow (Previous Row)

1-based index to the row immediately above the structure selection.

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

showHeader (Show Header)

Flag indicating whether selection toggle from data only to header only to both is enabled. False means disabled.

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

start (Start)

The line the structure selection begins (zero-based). This is the line clicked to initiate the structure selection.

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

[Note: The W3C XML Schema definition of this element’s content model (CT_PivotSelection) 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

PivotSelection Members

DocumentFormat.OpenXml.Spreadsheet Namespace