SlicerCollection.Add

Add(PivotTable, string, string)

Add a new Slicer using PivotTable as data source

public int Add(PivotTable pivot, string destCellName, string baseFieldName)
ParameterTypeDescription
pivotPivotTablePivotTable object
destCellNameStringThe cell in the upper-left corner of the Slicer range.
baseFieldNameStringThe name of PivotField in PivotTable.BaseFields

Return Value

The new add Slicer index

Examples


[C#]

slicers.Add(pivot, "E3", "fruit");

See Also


Add(PivotTable, int, int, string)

Add a new Slicer using PivotTable as data source

public int Add(PivotTable pivot, int row, int column, string baseFieldName)
ParameterTypeDescription
pivotPivotTablePivotTable object
rowInt32Row index of the cell in the upper-left corner of the Slicer range.
columnInt32Column index of the cell in the upper-left corner of the Slicer range.
baseFieldNameStringThe name of PivotField in PivotTable.BaseFields

Return Value

The new add Slicer index

Examples


[C#]

slicers.Add(pivot, 20, 12, "fruit");

See Also


Add(PivotTable, int, int, int)

Add a new Slicer using PivotTable as data source

public int Add(PivotTable pivot, int row, int column, int baseFieldIndex)
ParameterTypeDescription
pivotPivotTablePivotTable object
rowInt32Row index of the cell in the upper-left corner of the Slicer range.
columnInt32Column index of the cell in the upper-left corner of the Slicer range.
baseFieldIndexInt32The index of PivotField in PivotTable.BaseFields

Return Value

The new add Slicer index

Examples


[C#]

slicers.Add(pivot, 20, 8, 0);

See Also


Add(PivotTable, string, int)

Add a new Slicer using PivotTable as data source

public int Add(PivotTable pivot, string destCellName, int baseFieldIndex)
ParameterTypeDescription
pivotPivotTablePivotTable object
destCellNameStringThe cell in the upper-left corner of the Slicer range.
baseFieldIndexInt32The index of PivotField in PivotTable.BaseFields

Return Value

The new add Slicer index

Examples


[C#]

slicers.Add(pivot, "E20", 0);

See Also


Add(PivotTable, int, int, PivotField)

Add a new Slicer using PivotTable as data source

public int Add(PivotTable pivot, int row, int column, PivotField baseField)
ParameterTypeDescription
pivotPivotTablePivotTable object
rowInt32Row index of the cell in the upper-left corner of the Slicer range.
columnInt32Column index of the cell in the upper-left corner of the Slicer range.
baseFieldPivotFieldThe PivotField in PivotTable.BaseFields

Return Value

The new add Slicer index

Examples


[C#]

slicers.Add(pivot, 3, 12, pivot.BaseFields[0]);

See Also


Add(PivotTable, string, PivotField)

Add a new Slicer using PivotTable as data source

public int Add(PivotTable pivot, string destCellName, PivotField baseField)
ParameterTypeDescription
pivotPivotTablePivotTable object
destCellNameStringThe cell in the upper-left corner of the Slicer range.
baseFieldPivotFieldThe PivotField in PivotTable.BaseFields

Return Value

The new add Slicer index

Examples


[C#]

slicers.Add(pivot, "I3", pivot.BaseFields[0]);

See Also


Add(ListObject, int, string)

Add a new Slicer using ListObjet as data source

public int Add(ListObject table, int index, string destCellName)
ParameterTypeDescription
tableListObjectListObject object
indexInt32The index of ListColumn in ListObject.ListColumns
destCellNameStringThe cell in the upper-left corner of the Slicer range.

Return Value

The new add Slicer index

Examples


[C#]

slicers.Add(table, 1, "E38");

See Also


Add(ListObject, ListColumn, string)

Add a new Slicer using ListObjet as data source

public int Add(ListObject table, ListColumn listColumn, string destCellName)
ParameterTypeDescription
tableListObjectListObject object
listColumnListColumnThe ListColumn in ListObject.ListColumns
destCellNameStringThe cell in the upper-left corner of the Slicer range.

Return Value

The new add Slicer index

Examples


[C#]

slicers.Add(table, table.ListColumns[1], "I38");

See Also


Add(ListObject, ListColumn, int, int)

Add a new Slicer using ListObjet as data source

public int Add(ListObject table, ListColumn listColumn, int row, int column)
ParameterTypeDescription
tableListObjectListObject object
listColumnListColumnThe ListColumn in ListObject.ListColumns
rowInt32Row index of the cell in the upper-left corner of the Slicer range.
columnInt32Column index of the cell in the upper-left corner of the Slicer range.

Return Value

The new add Slicer index

Examples


[C#]

slicers.Add(table, table.ListColumns[1], 38, 12);

See Also