# Slicer Style

Add styles to your slicers with the help of various built-in styles provided by DsExcel.

## Content

When you create a slicer, it is mandatory to create a slicer cache first and then use the slicer cache created base on the column of the table or the pivot table.
The SlicerCaches collection in DsExcel .NET holds all the slicer caches in the workbook.

## Set slicer to built-in style

You can set your slicer to built-in style by using the [Style property](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.ISlicer.Style.html) of the [ISlicer interface](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.ISlicer.html).
Refer to the following example code to set slicer to built-in style.

```csharp
//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);

//set slicer style to build in style.
slicer1.Style = workbook.TableStyles["SlicerStyleLight1"];
```