Partager via


SlicerCache.SortItems Property

Gets or sets whether the items in the slicer are sorted.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Property SortItems As XlSlicerSort
    Get
    Set
'Usage
Dim instance As SlicerCache
Dim value As XlSlicerSort

value = instance.SortItems

instance.SortItems = value
XlSlicerSort SortItems { get; set; }

Property Value

Type: Microsoft.Office.Interop.Excel.XlSlicerSort
A XlSlicerSort object.

Remarks

Read/write.

The default setting of this property is xlAscending.

The SortItems property of the SlicerCache object only applies to slicers that are based on PivotTables that are connected to workbook ranges or lists (SlicerCache.SourceType = xlDatabase). Attempting to access the SortItems property for slicers that are connected to a OLAP data sources (SlicerCache.OLAP = true) generates a run-time error. For OLAP data sources, use the SortItems property of the SlicerCacheLevel object instead.

See Also

Reference

SlicerCache Interface

SlicerCache Members

Microsoft.Office.Interop.Excel Namespace