[Table of Contents] [docx version]

SpreadsheetML Reference Material - Table of Contents

rangeSet (Range Set)

Represents a single range in the rangeSets collection. This complex type is intended to facilitate creating a PivotTable report by consolidating SpreadsheetML ranges that have similar categories of data to be summarized. The simplest layout for the data source is for each rangeSets of data to be in list-like format, with column labels in the first row, row labels in the first column, the rest of the rows having similar items in the same row and column, and no blank rows or columns within the range. A particular rangeSet can consist of a built-in named range that is provided by the application, a user defined named range, a range reference, or a reference to an external workbook.

When multiple ranges are consolidated using this functionality, up to 4 custom report filters (also known as page fields) can be created to help filter the PivotTable report, by specifically enabling one or more of the individual ranges to be selected in the report filter. For each custom page field created, a custom label can be specified and assigned to each range participating in the consolidation range, so that the PivotTable can be filtered by one or more of the ranges being summarized.

[Example: Consider a workbook with 6 worksheets. On Sheet1 we have:

On Sheet2 we have:

... and so on up through Sheet5.

On Sheet6, we have the consolidated ranges being summarized by a PivotTable, and two page filters exist for the PivotTable.

Notice that for the second page filter, the items have been assigned a custom label, "one", "two", ..., "five", for each of Sheet1, Sheet2, ..., Sheet5 data sources, respectively. Similarly, the items have been assigned a custom label, "1", "2", ..., "5" for each of Sheet1, Sheet2, ..., Shet5 data sources, respectively.

The XML representing these custom page filters shall be like the following:

<cacheSource type="consolidation">
<consolidation autoPage="0">
<pages count="2">
<page count="5">
<pageItem name="1"/>
<pageItem name="2"/>
<pageItem name="3"/>
<pageItem name="4"/>
<pageItem name="5"/>
</page>

<page count="5">
<pageItem name="one"/>
<pageItem name="two"/>
<pageItem name="three"/>
<pageItem name="four"/>
<pageItem name="five"/>
</page>
</pages>

<rangeSets count="5">
<rangeSet i1="0" i2="0" ref="A1:B3" sheet="Sheet1"/>
<rangeSet i1="1" i2="1" ref="A1:B3" sheet="Sheet2"/>
<rangeSet i1="2" i2="2" ref="A1:B3" sheet="Sheet3"/>
<rangeSet i1="3" i2="3" ref="A1:B3" sheet="Sheet4"/>
<rangeSet i1="4" i2="4" ref="A1:B3" sheet="Sheet5"/>
</rangeSets>
</consolidation>
</cacheSource>

end example]

[Note: Attributes i1, i2, i3, and i4 correspond to custom page fields created in the user interface. Spreadsheet ML only supports 4 custom page fields. end note]

Parent Elements

rangeSets3.10.1.80)

 

Attributes

Description

i1 (Field Item Index Page 1)

Specifies the index of a page field item in page filter one.

 

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

i2 (Field Item Index Page 2)

Specifies the index of a page field item in page filter two.

 

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

i3 (Field Item index Page 3)

Specifies the index of a page field item in page filter three.

 

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

i4 (Field Item Index Page 4)

Specifies the index of a page field item in page filter four.

 

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

id (Relationship Id)

 

Namespace: .../officeDocument/2006/relationships

Specifies the unique identifier of the Workbook part where the range set is stored. See Workbook (§) for more information.

 

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

name (Named Range)

Specifies the named range.

 

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

ref (Reference)

Specifies the cell range.

 

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

sheet (Sheet Name)

Specifies the sheet name.

 

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

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

<complexType name="CT_RangeSet">

   <attribute name="i1" type="xsd:unsignedInt" use="optional"/>

   <attribute name="i2" type="xsd:unsignedInt" use="optional"/>

   <attribute name="i3" type="xsd:unsignedInt" use="optional"/>

   <attribute name="i4" type="xsd:unsignedInt" use="optional"/>

   <attribute name="ref" type="ST_Ref" use="optional"/>

   <attribute name="name" type="ST_Xstring" use="optional"/>

   <attribute name="sheet" type="ST_Xstring" use="optional"/>

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

</complexType>