[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ISlicers.Item

this Property

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.

Declaration
ISlicer this[int index] { get; }
ReadOnly Default Property Item(index As Integer) As ISlicer
Parameters
Type Name Description
int index

The index of the slicer to get.

Examples
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];

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.

Declaration
ISlicer this[string name] { get; }
ReadOnly Default Property Item(name As String) As ISlicer
Parameters
Type Name Description
string name

The name of the slicer to get.

Examples
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"];