[]
Represents a collection of ISlicer objects.
An ISlicers object provides access to the slicers associated with a
ISlicerCache. Use it to create slicers, iterate through existing slicers,
or retrieve a slicer by index or name.
public interface ISlicers : IEnumerable
Public Interface ISlicers
Inherits IEnumerable
object[,] sourceData = new object[,] {
{"Product", "Category"},
{"Apple", "Fruit"},
{"Carrot", "Vegetable"}
};
worksheet.Range["A1:B3"].Value = sourceData;
ITable table = worksheet.Tables.Add(worksheet.Range["A1:B3"], true);
ISlicerCache slicerCache = workbook.SlicerCaches.Add(table, "Category", "categoryCache");
ISlicers slicers = slicerCache.Slicers;
ISlicer slicer = slicers.Add(worksheet, "categorySlicer", "Category", 20, 20, 120, 160);
| Name | Description |
|---|---|
| Count | Gets the number of ISlicer objects in the collection. Use this property to determine how many slicers are associated with an ISlicerCache. |
| this[int] | Gets the ISlicer with the specified index. If the slicer's position is known, use this property to retrieve it from the collection. |
| this[string] | Gets the ISlicer with the specified name. If the slicer's name is known, use this property to retrieve it from the collection. |
| Name | Description |
|---|---|
| Add(IWorksheet, string, string, double, double, double, double) | Creates a slicer on the specified worksheet and returns the new ISlicer. The slicer is added to this collection and positioned using coordinates measured in points, relative to the upper-left corner of cell A1 on the destination worksheet. |