Partager via


CacheHierarchy Class

Defines the CacheHierarchy Class.This class is only available in Office2010.When the object is serialized out as xml, its qualified name is x14:cacheHierarchy.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Office2010.Excel.CacheHierarchy

Namespace:  DocumentFormat.OpenXml.Office2010.Excel
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(SetLevels), FileFormatVersions.Office2010)> _
Public Class CacheHierarchy _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As CacheHierarchy
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(SetLevels), FileFormatVersions.Office2010)]
public class CacheHierarchy : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • SetLevels <x14:setLevels>

2.4.14 cacheHierarchy

Target namespace: https://schemas.microsoft.com/office/spreadsheetml/2010/main

A CT_CacheHierarchy element that specifies the extended properties of a PivotTable ([ISO/IEC-29500-1] section 18.10) named set. See Pivot Table Cache Definition under Extensions by Part for how this element integrates with [ISO/IEC-29500-1].

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this element.

<xsd:element name="cacheHierarchy" type="CT_CacheHierarchy"/>

See section 5.3 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).

2.6.24 CT_CacheHierarchy

Target namespace: https://schemas.microsoft.com/office/spreadsheetml/2010/main

Referenced by: cacheHierarchy

This complex type specifies the extended properties of a PivotTable ([ISO/IEC-29500-1] section 18.10) named set. When an element of this type is present the set attribute of the ancestor cacheHierarchy element of type CT_CacheHierarchy ([ISO/IEC-29500-4] section A.2) MUST be TRUE.

Child Elements:

setLevels : A CT_SetLevels element that specifies the OLAP levels of the hierarchy that is used by this PivotTable ([ISO/IEC-29500-1] section 18.10) named set<22>.

Attributes:

flattenHierarchies : A boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies whether to display members from different levels of the same PivotTable ([ISO/IEC-29500-1] section 18.10) cache hierarchy of this PivotTable ([ISO/IEC-29500-1] section 18.10) named set in the same PivotTable ([ISO/IEC-29500-1] section 18.10) field. MUST be FALSE if ignore is TRUE. If a CT_CalculatedMember element that corresponds to the PivotTable ([ISO/IEC-29500-1] section 18.10) named set exists, this attribute MUST be equal to flattenHieararchies attribute of the CT_CalculatedMember element.

ignore

flattenHierarchies

Meaning

TRUE

FALSE

The ancestor cacheHierarchy element of type CT_CacheHierarchy ([ISO/IEC-29500-4] section A.2) of this PivotTable ([ISO/IEC-29500-1] section 18.10) named set is discarded.

FALSE

FALSE

Each member from a different level of the same PivotTable ([ISO/IEC-29500-1] section 18.10) cache hierarchy of this PivotTable ([ISO/IEC-29500-1] section 18.10) named set is displayed in a separate PivotTable ([ISO/IEC-29500-1] section 18.10) field.

FALSE

TRUE

All members from different levels of the same PivotTable ([ISO/IEC-29500-1] section 18.10) cache hierarchy of this PivotTable ([ISO/IEC-29500-1] section 18.10) named set are displayed in the same PivotTable ([ISO/IEC-29500-1] section 18.10) field.

measuresSet : A boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies whether this PivotTable ([ISO/IEC-29500-1] section 18.10) named set contains one or more PivotTable ([ISO/IEC-29500-1] section 18.10) measure cache hierarchies. MUST be FALSE if ignore is TRUE.

ignore

measureSet

Meaning

TRUE

FALSE

The ancestor cacheHierarchy element of type CT_CacheHierarchy ([ISO/IEC-29500-4] section A.2) of this PivotTable ([ISO/IEC-29500-1] section 18.10) named set is discarded.

FALSE

FALSE

The PivotTable ([ISO/IEC-29500-1] section 18.10) named set does not contain PivotTable ([ISO/IEC-29500-1] section 18.10) measure cache hierarchies.

FALSE

TRUE

The PivotTable ([ISO/IEC-29500-1] section 18.10) named set contains PivotTable ([ISO/IEC-29500-1] section 18.10) measure cache hierarchies.

hierarchizeDistinct : A boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies whether to automatically order and remove duplicates from this PivotTable ([ISO/IEC-29500-1] section 18.10) named set. MUST be FALSE if ignore is TRUE. If a CT_CalculatedMember element that corresponds to the PivotTable ([ISO/IEC-29500-1] section 18.10) named set exists, this attribute MUST be equal to hierachizeDistinct attribute of the CT_CalculatedMember element.

ignore

hierarchizeDistinct

Meaning

TRUE

FALSE

The ancestor cacheHierarchy element of type CT_CacheHierarchy ([ISO/IEC-29500-4] section A.2) of this PivotTable ([ISO/IEC-29500-1] section 18.10) named set is discarded.

FALSE

FALSE

Do not automatically order and remove duplicates from this PivotTable ([ISO/IEC-29500-1] section 18.10) named set.

FALSE

TRUE

Automatically order and remove duplicates from this PivotTable ([ISO/IEC-29500-1] section 18.10) named set.

ignore : A boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies whether the ancestor cacheHierarchy element of type CT_CacheHierarchy ([ISO/IEC-29500-4] section A.2) SHOULD<23> be discarded. If ignore is TRUE the ancestor cacheHierarchy element of type CT_CacheHierarchy ([ISO/IEC-29500-4] section A.2) MUST have the following attribute values:

Field

Value

measure

TRUE

set

FALSE

attribute

FALSE

measures

FALSE

oneField

FALSE

time

FALSE

keyAttribute

FALSE

memberValueDatatype

MUST NOT be specified.

unbalanced

MUST NOT be specified.

unbalancedGroup

MUST NOT be specified.

hidden

FALSE

count

0

parentSet

MUST NOT be specified.

dimensionUniqueName

MUST NOT be specified.

defaultMemberUniqueName

MUST NOT be specified.

allUniqueName

MUST NOT be specified.

allCaption

MUST NOT be specified.

displayFolder

MUST NOT be specified.

measureGroup

MUST NOT be specified.

uniqueName

“DummyN”, where N is the text string representing in decimal form the 0-based index of the ancestor CT_CacheHierarchy ([ISO/IEC-29500-4] section A.2) element within the group of CT_CacheHierarchy ([ISO/IEC-29500-4] section A.2) elements that have a descendent CT_CacheHierarchy element with the ignore attribute equal to TRUE.

Within the CT_CacheHierarchies ([ISO/IEC-29500-4] section A.2) element, all CT_CacheHierarchy ([ISO/IEC-29500-4] section A.2) elements that have a descendant CT_CacheHierarchy element with the ignore attribute equal to TRUE MUST follow all other CT_CacheHierarchy ([ISO/IEC-29500-4] section A.2) elements without a descendent CT_CacheHierarchy element or with a descendent CT_CacheHierarchy element with ignore attribute equal to FALSE.

If this attribute is equal to TRUE, there MUST exist a CT_DataField ([ISO/IEC-29500-4] section A.2) element with a fld attribute equal to the zero-based index of a CT_CacheField ([ISO/IEC-29500-4] section A.2) element in the list of CT_CacheField ([ISO/IEC-29500-4] section A.2) elements specified by CT_CacheFields ([ISO/IEC-29500-4] section A.2) with a hierarchy attribute that specifies the ancestor CT_CacheHierarchy ([ISO/IEC-29500-4] section A.2). Additionally, that CT_DataField ([ISO/IEC-29500-4] section A.2) element MUST have a descendant CT_DataField element with a sourceField attribute specified.

For more details, see CT_DataField

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this complex type.

<xsd:complexType name="CT_CacheHierarchy">

<xsd:sequence>

<xsd:element name="setLevels" minOccurs="0" maxOccurs="1" type="CT_SetLevels"/>

</xsd:sequence>

<xsd:attribute name="flattenHierarchies" type="xsd:boolean" use="optional" default="true"/>

<xsd:attribute name="measuresSet" type="xsd:boolean" use="optional" default="false"/>

<xsd:attribute name="hierarchizeDistinct" type="xsd:boolean" use="optional" default="true"/>

<xsd:attribute name="ignore" type="xsd:boolean" default="false" use="optional"/>

</xsd:complexType>

See section 5.3 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).

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

CacheHierarchy Members

DocumentFormat.OpenXml.Office2010.Excel Namespace