Bewerken

Delen via


Slicer Interface

Definition

Represents a slicer in a workbook.

public interface class Slicer
[System.Runtime.InteropServices.Guid("000244C8-0000-0000-C000-000000000046")]
[System.Runtime.InteropServices.InterfaceType(2)]
public interface Slicer
Public Interface Slicer
Attributes

Remarks

Each Slicer object represents a slicer in a workbook. Slicers are used to filter data in PivotTable reports or OLAP data sources.

Use the Microsoft.Office.Interop.Excel.Slicers.Add method to add a Slicer object to the Slicers collection. To access the SlicerItem object that represents the currently selected button in a slicer, use the ActiveItem property of the Slicer object.

Properties

ActiveItem

Returns a SlicerItem object that represents the slicer button that is currently in focus for the specified slicer. Read-only.

Application

When used without an object qualifier, this property returns an Application object that represents the Microsoft Excel application. When used with an object qualifier, this property returns an Application object that represents the creator of the specified object.

Caption

Gets or sets the caption of the specified slicer.

ColumnWidth

Gets or sets the width, in points, of each column in the slicer.

Creator

Gets a 32-bit integer that indicates the application in which this object was created.

DisableMoveResizeUI

Gets or sets whether the specified slicer can be moved or resized by using the user interface.

DisplayHeader

Gets or sets whether the header that displays the slicer Caption is visible.

Height

Gets or sets the height of the specified slicer, in points.

Left

Gets or sets the horizontal position of the specified slicer, in points, relative to the upper-left corner of cell A1 on a worksheet.

Locked

Gets or sets whether the specified slicer can be modified when the sheet that contains it is protected.

Name

Gets or sets the name of the specified slicer.

NumberOfColumns

Gets or sets the number of columns in the specified slicer.

Parent

Gets the Worksheet object that represents the sheet that contains the slicer.

RowHeight

Gets or sets the height, in points, of each row in the specified slicer.

Shape

Gets the Shape object associated with the specified slicer.

SlicerCache

Gets the SlicerCache object associated with the slicer.

SlicerCacheLevel

Gets the SlicerCacheLevel object associated with the slicer.

SlicerCacheType

Returns the type of the slicer cache – slicer or timeline. XlSlicerCacheType Read-only

Style

Gets or sets the style currently applied to the specified slicer.

TimelineViewState

The timeline-specific state of the Slicer. TimelineViewState Read-only

Top

Gets or sets the vertical position of the specified slicer, in points, relative to the upper-left corner of cell A1 on a worksheet.

Width

Gets or sets the width of the specified slicer, in points.

Methods

Copy()

Copies the specified slicer to the clipboard.

Cut()

Cuts the specified slicer and copies it to the clipboard.

Delete()

Deletes the slicer and removes it from the associated Slicers collection.

Applies to