共用方式為


CacheSource Class

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

Inheritance Hierarchy

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

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(WorksheetSource))> _
<ChildElementInfoAttribute(GetType(Consolidation))> _
<ChildElementInfoAttribute(GetType(CacheSourceExtensionList))> _
Public Class CacheSource _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As CacheSource
[ChildElementInfoAttribute(typeof(WorksheetSource))]
[ChildElementInfoAttribute(typeof(Consolidation))]
[ChildElementInfoAttribute(typeof(CacheSourceExtensionList))]
public class CacheSource : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • WorksheetSource <x:worksheetSource>

  • Consolidation <x:consolidation>

  • CacheSourceExtensionList <x:extLst>

[ISO/IEC 29500-1 1st Edition]

18.10.1.7 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.

DocumentFormat.OpenXml.Spreadsheet.CacheSource-ima

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

[Example:

<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 (§18.10.1.67)

Child Elements

Subclause

consolidation (Consolidation Source)

§18.10.1.20

extLst (Future Feature Data Storage Area)

§18.2.10

worksheetSource (Worksheet PivotCache Source)

§18.10.1.95

Attributes

Description

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

Reference

CacheSource Members

DocumentFormat.OpenXml.Spreadsheet Namespace