Compartir a través de


PivotCacheDefinition Class

PivotCache Definition. It is the root element of PivotTableCacheDefinitionPart.When the object is serialized out as xml, its qualified name is x:pivotCacheDefinition.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.OpenXmlPartRootElement
        DocumentFormat.OpenXml.Spreadsheet.PivotCacheDefinition

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(Kpis))> _
<ChildElementInfoAttribute(GetType(CalculatedMembers))> _
<ChildElementInfoAttribute(GetType(CacheSource))> _
<ChildElementInfoAttribute(GetType(CacheFields))> _
<ChildElementInfoAttribute(GetType(CacheHierarchies))> _
<ChildElementInfoAttribute(GetType(MeasureGroups))> _
<ChildElementInfoAttribute(GetType(TupleCache))> _
<ChildElementInfoAttribute(GetType(CalculatedItems))> _
<ChildElementInfoAttribute(GetType(PivotCacheDefinitionExtensionList))> _
<ChildElementInfoAttribute(GetType(Dimensions))> _
<ChildElementInfoAttribute(GetType(Maps))> _
Public Class PivotCacheDefinition _
    Inherits OpenXmlPartRootElement
'Usage
Dim instance As PivotCacheDefinition
[ChildElementInfoAttribute(typeof(Kpis))]
[ChildElementInfoAttribute(typeof(CalculatedMembers))]
[ChildElementInfoAttribute(typeof(CacheSource))]
[ChildElementInfoAttribute(typeof(CacheFields))]
[ChildElementInfoAttribute(typeof(CacheHierarchies))]
[ChildElementInfoAttribute(typeof(MeasureGroups))]
[ChildElementInfoAttribute(typeof(TupleCache))]
[ChildElementInfoAttribute(typeof(CalculatedItems))]
[ChildElementInfoAttribute(typeof(PivotCacheDefinitionExtensionList))]
[ChildElementInfoAttribute(typeof(Dimensions))]
[ChildElementInfoAttribute(typeof(Maps))]
public class PivotCacheDefinition : OpenXmlPartRootElement

Remarks

The following table lists the possible child types:

  • CacheSource <x:cacheSource>

  • CacheFields <x:cacheFields>

  • CacheHierarchies <x:cacheHierarchies>

  • Kpis <x:kpis>

  • TupleCache <x:tupleCache>

  • CalculatedItems <x:calculatedItems>

  • CalculatedMembers <x:calculatedMembers>

  • Dimensions <x:dimensions>

  • MeasureGroups <x:measureGroups>

  • Maps <x:maps>

  • PivotCacheDefinitionExtensionList <x:extLst>

[ISO/IEC 29500-1 1st Edition]

18.10.1.67 pivotCacheDefinition (PivotCache Definition)

Represents the pivotCacheDefinition part. This part defines each field in the source data, including the name, the string resources of the instance data (for shared items), and information about the type of data that appears in the field.

[Example:

<pivotCacheDefinition xmlns="…" xmlns:r="…" r:id="rId1" refreshedBy="AnonUser"
refreshedDate="2006-05-22T10:07:16Z" createdVersion="3" refreshedVersion="3"
minRefreshableVersion="3" recordCount="182">
  <cacheSource type="worksheet">
<worksheetSource name="Table1"/>
</cacheSource>
  <cacheFields count="28">
<cacheField name="Customer Name" numFmtId="0">
<cacheField name="Postal Code" numFmtId="0">
<sharedItems/>
</cacheField>
    <cacheField name="Product Category" numFmtId="0">
<sharedItems count="1">
<s v="Bikes"/>
</sharedItems>
</cacheField>
    <cacheField name="Year" numFmtId="0">
<sharedItems count="1">
<s v="2001"/>
</sharedItems>
</cacheField>
    <cacheField name="Quarter" numFmtId="0">
<sharedItems containsSemiMixedTypes="0" containsString="0"
containsNumber="1" containsInteger="1" minValue="3" maxValue="3"
count="1">
<n v="3"/>
</sharedItems>
</cacheField>
</cacheFields>
</pivotCacheDefinition>

end example]

Parent Elements

Root element of SpreadsheetML Pivot Table Cache Definition part

Child Elements

Subclause

cacheFields (PivotCache Fields)

§18.10.1.4

cacheHierarchies (PivotCache Hierarchies)

§18.10.1.5

cacheSource (PivotCache Source Description)

§18.10.1.7

calculatedItems (Calculated Items)

§18.10.1.9

calculatedMembers (Calculated Members)

§18.10.1.11

dimensions (OLAP Dimensions)

§18.10.1.25

extLst (Future Feature Data Storage Area)

§18.2.10

kpis (OLAP KPIs)

§18.10.1.48

maps (OLAP Measure Group)

§18.10.1.52

measureGroups (OLAP Measure Groups)

§18.10.1.54

tupleCache (Tuple Cache)

§18.10.1.94

Attributes

Description

backgroundQuery (Background Query)

Specifies a boolean value that indicates whether the application should query and retrieve records asynchronously from the cache.

A value of 1 or true indicates the application will retrieve records asynchronously from the cache.

A value of 0 or false indicates the application will retrieve records synchronously.

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

createdVersion (PivotCache Created Version)

Specifies the version of the application that created the cache. This attribute is application-dependent.

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

enableRefresh (Enable PivotCache Refresh)

Specifies a boolean value that indicates whether the end-user can refresh the cache. This attribute depends on whether the application exposes a method for allowing end-users control over refreshing the cache via the user interface.

A value of 1 or true indicates the end-user can refresh the cache.

A value of 0 or false indicates the end-user cannot refresh the cache.

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

id (Relationship Identifier)

Namespace: .../officeDocument/2006/relationships

Specifies the unique identifier that corresponds to the related pivotCacheRecords part. See (§18.10.1.68) for more information.

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

invalid (Invalid Cache)

Specifies a boolean value that indicates whether the cache needs to be refreshed.

A value of 1 or true indicates the cache needs to be refreshed.

A value of 0 or false indicates the cache does not need to be refreshed.

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

minRefreshableVersion (Minimum Version Required for Refresh)

Specifies the earliest version of the application that is required to refresh the cache. This attribute is application-dependent.

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

missingItemsLimit (Missing Items Limit)

Specifies the number of unused items to allow before discarding unused items. This attribute is application-dependent. The application shall specify a threshold for unused items.

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

optimizeMemory (Optimize Cache for Memory)

Specifies a boolean value that indicates whether the application will apply optimizations to the cache to reduce memory usage. This attribute is application-dependent. This application shall define its own cache optimization methods. The application shall also decide whether to expose cache optimization status via the user interface or an object model.

A value of 1 or true indicates the application will apply optimizations to the cache.

A value of 0 or false indicates the application will not apply optimizations to the cache.

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

recordCount (PivotCache Record Count)

Specifies the number of records in the cache.

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

refreshedBy (Last Refreshed By)

Specifies the name of the end-user who last refreshed the cache. This attribute is application-dependent and is specified by applications that track and store the identity of the current user. This attribute also depends on whether the application exposes mechanisms via the user interface whereby the end-user can refresh the cache.

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

refreshedDateIso (PivotCache Last Refreshed Date ISO)

Specifies the date when the cache was last refreshed. This attribute depends on whether the application exposes mechanisms via the user interface whereby the end-user can refresh the cache.

If refreshedDateIso and refreshedDate are both present, refreshedDateIso shall take precedence.

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

refreshedVersion (PivotCache Last Refreshed Version)

Specifies the version of the application that last refreshed the cache. This attribute depends on whether the application exposes mechanisms via the user interface whereby the end-user can refresh the cache.

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

refreshOnLoad (Refresh On Load)

Specifies a boolean value that indicates whether the application will refresh the cache when the workbook has been opened.

A value of 1 or true indicates that application will refresh the cache when the workbook is loaded.

A value of 0 or false indicates the application will not automatically refresh cached data. The end user shall trigger refresh of the cache manually via the application user interface.

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

saveData (Save Pivot Records)

Specifies a boolean value that indicates whether the pivot records are saved with the cache.

A value of 1 or true indicates pivot records are saved in the cache.

A value of 0 or false indicates are not saved in the cache.

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

supportAdvancedDrill (Supports Attribute Drilldown)

Specifies whether the cache's data source supports attribute drilldown.

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

supportSubquery (Supports Subqueries)

Specifies whether the cache's data source supports subqueries.

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

tupleCache (Stores Cache for OLAP Functions)

Specifies a boolean value that indicates whether the PivotCache is used store information for OLAP sheet data functions.

A value of 1 or true indicates information about OLAP sheet data functions are stored in the cache.

A value of 0 or false indicates the PivotCache does not contain information about OLAP sheet data functions.

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

upgradeOnRefresh (Upgrade PivotCache on Refresh)

Specifies a boolean value that indicates whether the cache is scheduled for version upgrade. This attribute depends on whether the application exposes mechanisms via the user interface whereby the cache might be upgraded.

A value of 1 or true indicates the cache is scheduled for upgrade.

A value of 0 or false indicates the cache is not scheduled for upgrade.

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

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

PivotCacheDefinition Members

DocumentFormat.OpenXml.Spreadsheet Namespace