Add(Object, Object, Object, Object, Object, Object, Object, Object) Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new slicer and returns a Slicer object.
public Microsoft.Office.Interop.Excel.Slicer Add (object SlicerDestination, object Level, object Name, object Caption, object Top, object Left, object Width, object Height);
Public Function Add (SlicerDestination As Object, Optional Level As Object, Optional Name As Object, Optional Caption As Object, Optional Top As Object, Optional Left As Object, Optional Width As Object, Optional Height As Object) As Slicer
A string that specifies the name of the sheet, or a Worksheet object that represents the sheet, where the resulting slicer will be placed. The destination sheet must be in the workbook that contains the Slicers object specified by expression.
For OLAP data sources, the ordinal or the Multidimensional Expression (MDX) name of the level on which the slicer creation is based. Not supported for non-OLAP data sources.
The name of the slicer. Excel automatically generates a name if one is not specified. The name must be unique across all slicers within a workbook.
The caption of the slicer.
The initial vertical position of the slicer, in points, relative to the upper-left corner of cell A1 on a worksheet.
The initial horizontal position of the slicer, in points, relative to the upper-left corner of cell A1 on a worksheet.
The initial width, in points, of the slicer control.
The initial height, in points, of the slicer control.
A Slicer object.