A collection of workbook styles, or complex formats which can be easily applied to cells in Microsoft Excel.

WorkbookStyleCollection

new WorkbookStyleCollection(a: Workbook): WorkbookStyleCollection

Returns WorkbookStyleCollection

$t: Type

Gets the number of styles in the collection. The number of styles in the collection.

get count(): number

Returns number

Gets the default style for the workbook.

get normalStyle(): WorkbookStyle

Returns WorkbookStyle

_u(): IEnumerable$1<WorkbookBuiltInStyle>

Returns IEnumerable$1<WorkbookBuiltInStyle>

Adds new user defined style to the workbook.

addUserDefinedStyle(styleFormat: IWorksheetCellFormat, name: string): WorkbookStyle

Parameters

  • styleFormat: IWorksheetCellFormat

    A cell format of the style.

  • name: string

    The name which will identify the style in Microsoft Excel.

Returns WorkbookStyle

Clears all styles, other than the Normal style, from the collection.

clear(): void

Returns void

Determines whether a style is in the collection.

contains(style: WorkbookStyle): boolean

Parameters

Returns boolean

Gets the style at the specified index. The style at the specified index.

item(index: number): WorkbookStyle

Parameters

  • index: number

    The zero-based index of the style to get.

Returns WorkbookStyle

Removes the specified style from the collection.

remove(style: WorkbookStyle): boolean

Parameters

Returns boolean

Removes the style at the specified index from the collection.

removeAt(index: number): void

Parameters

  • index: number

    The zero-based index of the style in the collection.

Returns void

Resets the collection to its original state by clearing all styles and adding in preset built in styles.

reset(): void

Returns void

staticInit(): void

Returns void