Document Solutions for Excel, Java Edition | Document Solutions
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 setRowHeight method and setDisplayHeader method of the ISlicer interface.

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

    Java
    Copy Code
    // Create slicer cache for table.
    ISlicerCache cache = workbook.getSlicerCaches().add(table, "Product", "productCache");
    
    // Add slicer for the table
    ISlicer slicer1 = cache.getSlicers().add(workbook.getWorksheets().get("Sheet1"), 
    "product1", "Product", 30, 550, 100, 200);
    
    // Configure slicer layout.
    slicer1.setNumberOfColumns(2);
    slicer1.setRowHeight(25);
    slicer1.setDisplayHeader(false);