TableStyleCollection
TableStyleCollection class
Represents all custom table styles.
class TableStyleCollection;
Properties
| Property | Type | Description |
|---|---|---|
| defaultTableStyleName | string | Gets and sets the default style name of the table. |
| defaultPivotStyleName | string | Gets and sets the default style name of pivot table . |
Methods
| Method | Description |
|---|---|
| get(number) | Gets the table style by the index. |
| get(string) | Gets the table style by the name. |
| getDefaultTableStyleName() | @deprecated. Please use the ‘defaultTableStyleName’ property instead. Gets and sets the default style name of the table. |
| setDefaultTableStyleName(string) | @deprecated. Please use the ‘defaultTableStyleName’ property instead. Gets and sets the default style name of the table. |
| getDefaultPivotStyleName() | @deprecated. Please use the ‘defaultPivotStyleName’ property instead. Gets and sets the default style name of pivot table . |
| setDefaultPivotStyleName(string) | @deprecated. Please use the ‘defaultPivotStyleName’ property instead. Gets and sets the default style name of pivot table . |
| addTableStyle(string) | Adds a custom table style. |
| addPivotTableStyle(string) | Adds a custom pivot table style. |
| getBuiltinTableStyle(TableStyleType) | Gets the builtin table style |
| getCount() | @deprecated. Please use the ‘count’ property instead. Gets the number of elements contained in. |
| isNull() | Checks whether the implementation object is null. |
defaultTableStyleName
Gets and sets the default style name of the table.
defaultTableStyleName : string;
defaultPivotStyleName
Gets and sets the default style name of pivot table .
defaultPivotStyleName : string;
get(number)
Gets the table style by the index.
get(index: number) : TableStyle;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| index | number | The position of the table style in the list. |
Returns
The table style object.
get(string)
Gets the table style by the name.
get(name: string) : TableStyle;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string | The table style name. |
Returns
The table style object.
getDefaultTableStyleName()
@deprecated. Please use the ‘defaultTableStyleName’ property instead. Gets and sets the default style name of the table.
getDefaultTableStyleName() : string;
setDefaultTableStyleName(string)
@deprecated. Please use the ‘defaultTableStyleName’ property instead. Gets and sets the default style name of the table.
setDefaultTableStyleName(value: string) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | string | The value to set. |
getDefaultPivotStyleName()
@deprecated. Please use the ‘defaultPivotStyleName’ property instead. Gets and sets the default style name of pivot table .
getDefaultPivotStyleName() : string;
setDefaultPivotStyleName(string)
@deprecated. Please use the ‘defaultPivotStyleName’ property instead. Gets and sets the default style name of pivot table .
setDefaultPivotStyleName(value: string) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | string | The value to set. |
addTableStyle(string)
Adds a custom table style.
addTableStyle(name: string) : number;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string | The table style name. |
Returns
The index of the table style.
addPivotTableStyle(string)
Adds a custom pivot table style.
addPivotTableStyle(name: string) : number;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | string | The pivot table style name. |
Returns
The index of the pivot table style.
getBuiltinTableStyle(TableStyleType)
Gets the builtin table style
getBuiltinTableStyle(type: TableStyleType) : TableStyle;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| type | TableStyleType | The builtin table style type. |
Returns
getCount()
@deprecated. Please use the ‘count’ property instead. Gets the number of elements contained in.
getCount() : number;
isNull()
Checks whether the implementation object is null.
isNull() : boolean;