[Table of Contents] [docx version]

SpreadsheetML Reference Material - Table of Contents

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:

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

sheetView3.3.1.83)

 

Child Elements

Subclause

pivotArea (Pivot Area)

§3.3.1.66

 

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 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 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 (§3.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 must 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 XML Schema unsignedInt datatype.

count (Selection Count)

Number of selections for the structure selection.

 

The possible values for this attribute are defined by the 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 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 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 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 (§7.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 XML Schema boolean datatype.

max (Maximum)

The maximum line the structure selection contains.

 

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

min (Minimum)

The minimum line the structure selection contains.

 

The possible values for this attribute are defined by the 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 (§3.18.54).

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 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 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 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 XML Schema unsignedInt datatype.

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_PivotSelection">

   <sequence>

   <element name="pivotArea" type="CT_PivotArea"/>

   </sequence>

   <attribute name="pane" type="ST_Pane" use="optional" default="topLeft"/>

   <attribute name="showHeader" type="xsd:boolean" default="false"/>

   <attribute name="label" type="xsd:boolean" default="false"/>

   <attribute name="data" type="xsd:boolean" default="false"/>

   <attribute name="extendable" type="xsd:boolean" default="false"/>

   <attribute name="count" type="xsd:unsignedInt" default="0"/>

   <attribute name="axis" type="ST_Axis" use="optional"/>

   <attribute name="dimension" type="xsd:unsignedInt" default="0"/>

   <attribute name="start" type="xsd:unsignedInt" default="0"/>

   <attribute name="min" type="xsd:unsignedInt" default="0"/>

   <attribute name="max" type="xsd:unsignedInt" default="0"/>

   <attribute name="activeRow" type="xsd:unsignedInt" default="0"/>

   <attribute name="activeCol" type="xsd:unsignedInt" default="0"/>

   <attribute name="previousRow" type="xsd:unsignedInt" default="0"/>

   <attribute name="previousCol" type="xsd:unsignedInt" default="0"/>

   <attribute name="click" type="xsd:unsignedInt" default="0"/>

   <attribute ref="r:id" use="optional"/>

</complexType>