[]
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.
bool Contains(string name)
Function Contains(name As String) As Boolean
| Type | Name | Description |
|---|---|---|
| string | name | The name of the table style to search for. |
| Type | Description |
|---|---|
| bool | true if the collection contains a table style with the specified name; otherwise, false. |
ITableStyleCollection tableStyles = workbook.TableStyles;
tableStyles.Add("CustomStyle");
bool hasCustomStyle = tableStyles.Contains("CustomStyle");