[]
Gets the ISlicer with the specified index.
If the slicer's position is known, use this property to retrieve it from the collection.
ISlicer this[int index] { get; }
ReadOnly Default Property Item(index As Integer) As ISlicer
| Type | Name | Description |
|---|---|---|
| int | index | The index of the slicer to get. |
worksheet.Range["A1:B3"].Value = new object[,] {
{"Category", "Amount"},
{"Fruit", 100},
{"Vegetable", 200}
};
ITable table = worksheet.Tables.Add(worksheet.Range["A1:B3"], true);
ISlicerCache cache = workbook.SlicerCaches.Add(table, "Category", "categoryCache");
cache.Slicers.Add(worksheet, "categorySlicer", "Category", 20, 20, 120, 160);
ISlicer slicer = cache.Slicers[0];
Gets the ISlicer with the specified name.
If the slicer's name is known, use this property to retrieve it from the collection.
ISlicer this[string name] { get; }
ReadOnly Default Property Item(name As String) As ISlicer
| Type | Name | Description |
|---|---|---|
| string | name | The name of the slicer to get. |
worksheet.Range["A1:B3"].Value = new object[,] {
{"Category", "Amount"},
{"Fruit", 100},
{"Vegetable", 200}
};
ITable table = worksheet.Tables.Add(worksheet.Range["A1:B3"], true);
ISlicerCache cache = workbook.SlicerCaches.Add(table, "Category", "categoryCache");
cache.Slicers.Add(worksheet, "categorySlicer", "Category", 20, 20, 120, 160);
ISlicer slicer = cache.Slicers["categorySlicer"];