Slicer class

Office 2013 and later

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

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

No code example is currently available or this language may not be supported.

2.6.68 CT_Slicer

Target namespace: http://schemas.microsoft.com/office/spreadsheetml/2009/9/main

Referenced by: CT_Slicers

A complex type that specifies a slicer view, as specified in section 2.3.2.2, in this worksheet.

Child Elements:

extLst: A CT_ExtensionList element, a specified in [ISO/IEC-29500-4] section A.2, that specifies future extensibility for this element.

Attributes:

name: An ST_Xstring attribute, as specified in [ISO/IEC-29500-1] section 22.9.2.19, that specifies the name of the slicer view. MUST be a unique case-insensitive name within the scope of this workbook. The length of this attribute MUST be greater than or equal to 1 character and MUST be less than or equal to 32767 characters.

cache: An ST_Xstring attribute that specifies the name of the slicer cache, as specified in section 2.3.2.1, that this slicer view is associated with. There MUST be a CT_SlicerCacheDefinition element, as specified in section 2.6.70, within this workbook with the name attribute equal to the value of this attribute.

caption: An ST_Xstring attribute that specifies the caption of the slicer view. If this string exists, the length MUST be greater than or equal to 1 character.

startItem: An unsignedInt attribute, as specified in [XMLSCHEMA2] section 3.3.22, that specifies the zero-based index of the first slicer item, as specified in section 2.3.2.1.6, displayed by the slicer view.

columnCount: An unsignedInt attribute that specifies the number of columns (2) in the slicer view. MUST be greater than or equal to 1 and MUST be less than or equal to 20000.

showCaption: A Boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies whether the caption is displayed.

level: An unsignedInt attribute that specifies the OLAP level of the OLAP hierarchy of the slicer source data used by this slicer view.

If the slicer source data is OLAP, the value MUST be greater than or equal to 0 and MUST be less than count of the CT_OlapSlicerCacheLevelsData element specified by the CT_SlicerCacheDefinition element specified by cache. If the OLAP hierarchy has an OLAP All level, the value MUST NOT be 0.

If the slicer source data is non-OLAP, this attribute MUST NOT exist.

style: An ST_Xstring ([ISO/IEC-29500-1] section 22.9.2.19) attribute that specifies the slicer style of the slicer view. If this field (1) exists, this string MUST match the name attribute of a CT_SlicerStyle element within this workbook or MUST be equal to one of the built-in slicer style names:

Built-in slicer style names

SlicerStyleLight1

SlicerStyleLight2

SlicerStyleLight3

SlicerStyleLight4

SlicerStyleLight5

SlicerStyleLight6

SlicerStyleOther1

SlicerStyleOther2

SlicerStyleDark1

SlicerStyleDark2

SlicerStyleDark3

SlicerStyleDark4

SlicerStyleDark5

SlicerStyleDark6

lockedPosition: A Boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies whether the slicer view is locked.

rowHeight: An unsignedInt ([XMLSCHEMA2] section 3.3.22) attribute that specifies the row (2) height of the slicer view in English Metric Units (EMUs).

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

<xsd:complexType name="CT_Slicer">

<xsd:sequence>

<xsd:element name="extLst" type="x:CT_ExtensionList" minOccurs="0" maxOccurs="1"/>

</xsd:sequence>

<xsd:attribute name="name" type="x:ST_Xstring" use="required"/>

<xsd:attribute name="cache" type="x:ST_Xstring" use="required"/>

<xsd:attribute name="caption" type="x:ST_Xstring" use="optional"/>

<xsd:attribute name="startItem" type="xsd:unsignedInt" use="optional" default="0"/>

<xsd:attribute name="columnCount" type="xsd:unsignedInt" use="optional" default="1"/>

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

<xsd:attribute name="level" type="xsd:unsignedInt" use="optional" default="0"/>

<xsd:attribute name="style" type="x:ST_Xstring" use="optional"/>

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

<xsd:attribute name="rowHeight" type="xsd:unsignedInt" use="required"/>

</xsd:complexType>

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.
Show: