SetLevel class

Office 2013 and later

Defines the SetLevel Class.This class is available in Office2010 or above. When the object is serialized out as xml, its qualified name is x14:setLevel.

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

public class SetLevel : OpenXmlLeafElement

2.6.23 CT_SetLevel

Target namespace:

Referenced by: CT_SetLevels

A complex type that specifies an OLAP level of the PivotTable ([ISO/IEC-29500-1] section 18.10) cache hierarchy of a PivotTable named set.


hierarchy: An int ([XMLSCHEMA2] section 3.3.17) attribute that specifies a reference to the PivotTable cache hierarchy. MUST be a value from the following table.




The PivotTable measure cache hierarchy is used.


No PivotTable cache hierarchy is used.

Greater than or equal to zero

A zero-based PivotTable cache hierarchy index. The referenced CT_CacheHierarchy ([ISO/IEC-29500-4] section A.2) element specifies the PivotTable cache hierarchy that is used. MUST be less than the number of CT_CacheHierarchy elements within the CT_CacheHierarchies ([ISO/IEC-29500-1] section 18.10) element.

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

<xsd:complexType name="CT_SetLevel">

<xsd:attribute name="hierarchy" use="required" type="xsd:int"/>


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

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.