[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ISlicer.Caption

Caption Property

Caption

Gets or sets the caption of the specified slicer.

Declaration
string Caption { get; set; }
Property Caption As String
Examples
worksheet.Range["A1:B3"].Value = new object[,] {
    {"Category", "Value"},
    {"Beverages", 100},
    {"Snacks", 200}
};
ITable table = worksheet.Tables.Add(worksheet.Range["A1:B3"], true);
ISlicerCache slicerCache = workbook.SlicerCaches.Add(table, "Category");
ISlicer slicer = slicerCache.Slicers.Add(worksheet, "categorySlicer", "Category", 20, 20, 120, 180);
slicer.Caption = "Product Category";
string caption = slicer.Caption;