CacheSource Class

PivotCache Source Description.When the object is serialized out as xml, its qualified name is x:cacheSource.

Inheritance Hierarchy


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


<ChildElementInfoAttribute(GetType(WorksheetSource))> _
<ChildElementInfoAttribute(GetType(Consolidation))> _
<ChildElementInfoAttribute(GetType(CacheSourceExtensionList))> _
Public Class CacheSource _
    Inherits OpenXmlCompositeElement
Dim instance As CacheSource
public class CacheSource : OpenXmlCompositeElement


The following table lists the possible child types:

  • WorksheetSource <x:worksheetSource>

  • Consolidation <x:consolidation>

  • CacheSourceExtensionList <x:extLst>

[ISO/IEC 29500-1 1st Edition] 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"/>

end example]

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

pivotCacheDefinition (§

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 §18.13.1 for more information about the connection element.

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

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


CacheSource Members

DocumentFormat.OpenXml.Spreadsheet Namespace