<cacheSource> (PivotCache Source Description)

Represents the description of data source whose data is stored in the pivot cache. The data source refers to the underlying rows or database records that provide the data for a PivotTable. You can create a PivotTable report from a SpreadsheetML table, an external database (including OLAP cubes), multiple SpreadsheetML worksheets, or another PivotTable.

Information about the data source is stored in the <connection> element and is retrieved using the <connectionId >attribute<.>

<cacheSource type="external" connectionId="1"/>

OLAP data sources are distinguished from other data sources in SpreadsheetML. OLAP records are not stored in the pivotCacheRecords part, whereas all records for non-OLAP data sources are stored in the cache.

Parent Elements


Child Elements


<consolidation> (Consolidation Source)


<extLst> (Future Feature Data Storage Area)


<worksheetSource> (Worksheet PivotCache Source)




<connectionId> (Connection Index)

Specifies the index to the workbook connection. This attribute is used when the cache type is 'External.' See §3.13.1 for more information about the <connection> element.

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

<type> (Cache Type)

Specifies the cache type.

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

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

<complexType name="CT_CacheSource">
	<choice minOccurs="0" maxOccurs="1">
	<element name="worksheetSource" type="CT_WorksheetSource" minOccurs="1" maxOccurs="1"/>
	<element name="consolidation" type="CT_Consolidation" minOccurs="1" maxOccurs="1"/>
	<element name="extLst" type="CT_ExtensionList" minOccurs="0"/>
	<attribute name="type" type="ST_SourceType" use="required"/>
	<attribute name="connectionId" type="xsd:unsignedInt" default="0" use="optional"/>