Documents for Excel .NET Edition | GCDocuments
Features / Slicer / Slicer Style / Modify Table Layout for Slicer Style
In This Topic
    Modify Table Layout for Slicer Style
    In This Topic

    You can modify the table layout for the slicer style applied in your spreadsheet by modifying some settings including the RowHeight property and DisplayHeader property of the ISlicer interface.

    Refer to the following example code to modify table layout for slicer style.

    C#
    Copy Code
    //create slicer cache for table.
    ISlicerCache cache = workbook.SlicerCaches.Add(table, "Category", "categoryCache");
    
    //add slicer
    ISlicer slicer1 = cache.Slicers.Add(workbook.Worksheets["Sheet1"], "cate1", "Category", 200, 200, 100, 200);
    
    slicer1.NumberOfColumns = 2;
    //slicer1.ColumnWidth = 10;
    slicer1.RowHeight = 50;
    slicer1.DisplayHeader = false;