# Table Style

Create custom table style elements and apply them to the tables in your worksheet using DsExcel.

## Content

In DsExcel .NET, you can create custom table style elements and apply them to your worksheet using the [ITableStyle Interface](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.ITableStyle.html). Also, you can format a table using any of the predefined table styles provided by DsExcel .NET.
Typically, each workbook possesses an [ITableStyle collection](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.ITableStyleCollection.html) that is used to store both built-in and custom table styles. If you want to insert a custom table style, you use the [Add method](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.ITables.Add.html) of the [ITables interface](/document-solutions/dot-net-excel-api/api/online/DS.Documents.Excel/GrapeCity.Documents.Excel.ITables.html), which returns the IStyle object representing the corresponding table style instance.

```csharp
//Use table style name get one build in table style.
ITableStyle tableStyle = workbook.TableStyles["TableStyleLight11"];
worksheet.Tables.Add(worksheet.Range[0, 0, 2, 2], true);

//set build in table style to table.
worksheet.Tables[0].TableStyle = tableStyle;
```