TableStyleCollection

TableStyleCollection class

Represents all custom table styles.

class TableStyleCollection;

Properties

PropertyTypeDescription
defaultTableStyleNamestringGets and sets the default style name of the table.
defaultPivotStyleNamestringGets and sets the default style name of pivot table .

Methods

MethodDescription
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:

ParameterTypeDescription
indexnumberThe 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:

ParameterTypeDescription
namestringThe 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:

ParameterTypeDescription
valuestringThe 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:

ParameterTypeDescription
valuestringThe value to set.

addTableStyle(string)

Adds a custom table style.

addTableStyle(name: string) : number;

Parameters:

ParameterTypeDescription
namestringThe table style name.

Returns

The index of the table style.

addPivotTableStyle(string)

Adds a custom pivot table style.

addPivotTableStyle(name: string) : number;

Parameters:

ParameterTypeDescription
namestringThe pivot table style name.

Returns

The index of the pivot table style.

getBuiltinTableStyle(TableStyleType)

Gets the builtin table style

getBuiltinTableStyle(type: TableStyleType) : TableStyle;

Parameters:

ParameterTypeDescription
typeTableStyleTypeThe builtin table style type.

Returns

TableStyle

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;