[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ITableStyleCollection.Contains

Contains Method

Contains(string)

Determines whether the collection contains a table style with the specified name.

Use this method to check whether a built-in or custom table style is available in the collection returned by TableStyles.

Declaration
bool Contains(string name)
Function Contains(name As String) As Boolean
Parameters
Type Name Description
string name

The name of the table style to search for.

Returns
Type Description
bool

true if the collection contains a table style with the specified name; otherwise, false.

Examples
ITableStyleCollection tableStyles = workbook.TableStyles;
tableStyles.Add("CustomStyle");
bool hasCustomStyle = tableStyles.Contains("CustomStyle");