[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ITableStyleCollection.Add

Add Method

Add(string)

Adds a custom table style with the specified name.

Use this method to create an ITableStyle in the workbook table style collection returned by TableStyles.

Declaration
ITableStyle Add(string name)
Function Add(name As String) As ITableStyle
Parameters
Type Name Description
string name

The name of the table style to add. Must not be null.

Returns
Type Description
ITableStyle

The newly added ITableStyle object.

Examples
ITableStyle tableStyle = workbook.TableStyles.Add("CustomTableStyle");
ITableStyleElement header = tableStyle.TableStyleElements[TableStyleElementType.HeaderRow];
header.Interior.Color = Color.Blue;
Exceptions
Type Condition
ArgumentNullException

if name is null or a table style with the same name already exists.