CacheHierarchy class
Defines the CacheHierarchy Class.This class is available in Office2010 or above. When the object is serialized out as xml, its qualified name is x14:cacheHierarchy.
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlCompositeElement
DocumentFormat.OpenXml.Office2010.Excel.CacheHierarchy
Namespace: DocumentFormat.OpenXml.Office2010.Excel
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
2.4.16 cacheHierarchy
Target namespace: http://schemas.microsoft.com/office/spreadsheetml/2009/9/main
A cacheHierarchy element is a CT_CacheHierarchy type element, as specified in section 2.6.24, that specifies the extended properties of a PivotTable, as specified in [ISO/IEC-29500-1] section 18.10, named set. See section 2.2.4.5 for how this element integrates with the Office Open XML file formats specified in [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.4 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).
2.6.24 CT_CacheHierarchy
Target namespace: http://schemas.microsoft.com/office/spreadsheetml/2009/9/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.
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 (1). 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 the flattenHierarchies 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 (1). |
"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 (1). |
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 hierarchizeDistinct 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<47> 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 zero-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 the ignore attribute equal to "false".
If this attribute is "true", there MUST exist a CT_DataField ([ISO/IEC-29500-4] section A.2) element with an 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.4 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).