ig.excel.WorkbookStyleCollection
Dependencies
-
addUserDefinedStyle
- .addUserDefinedStyle( styleFormat:ig.excel.IWorksheetCellFormat, name:string );
- Return Type:
- ig.excel.WorkbookStyle
- Return Type Description:
- The added user defined style as a WorkbookStyle instance.
Adds new user defined style to the workbook.
- styleFormat
- Type:ig.excel.IWorksheetCellFormat
- A cell format of the style.
- name
- Type:string
- The name which will identify the style in Microsoft Excel.
Exceptions
Exception Description ig.ArgumentNullException name is null or empty. ig.ArgumentNullException name is longer than 255 characters. ig.ArgumentException A style already exists with the a name of name. Names are compared case-insensitively. -
addUserDefinedStyle
- .addUserDefinedStyle( name:string );
- Return Type:
- ig.excel.WorkbookStyle
- Return Type Description:
- The added user defined style as a WorkbookStyle instance.
Adds new user defined style to the workbook.
- name
- Type:string
- The name which will identify the style in Microsoft Excel.
Exceptions
Exception Description ig.ArgumentNullException name is null or empty. ig.ArgumentNullException name is longer than 255 characters. ig.ArgumentException A style already exists with the a name of name. Names are compared case-insensitively. -
clear
- .clear( );
Clears all styles, other than the Normal style, from the collection.
-
contains
- .contains( style:ig.excel.WorkbookStyle );
- Return Type:
- boolean
- Return Type Description:
- True if the style is found; False otherwise.
Determines whether a style is in the collection.
- style
- Type:ig.excel.WorkbookStyle
- The style to locate in the collection.
-
count
- .count( );
- Return Type:
- number
- Return Type Description:
- The number of styles in the collection.
Gets the number of styles in the collection.
-
item
- .item( index:number );
- Return Type:
- ig.excel.WorkbookStyle
- Return Type Description:
- The style at the specified index.
Gets the style at the specified index.
- index
- Type:number
- The zero-based index of the style to get.
Exceptions
Exception Description ig.ArgumentOutOfRangeException index is less than zero or index is greater than or equal to WorkbookStyleCollection.count. -
item
- .item( name:string );
- Return Type:
- ig.excel.WorkbookStyle
- Return Type Description:
- The style with the specified name or null if no style with that name exists.
Gets the style with the specified name.
- name
- Type:string
- The name of the style to get.
Exceptions
Exception Description ig.ArgumentNullException name is null. Remarks
Style names are compared case-insensitively.
-
normalStyle
- .normalStyle( );
Gets the default style for the workbook.
Remarks
The normal style is the parent style for all cell and differential formats in the workbook, unless another parent style is specified.
See Also
-
remove
- .remove( style:ig.excel.WorkbookStyle );
- Return Type:
- boolean
- Return Type Description:
- True if the style was successfully removed; False if the style was not in the collection.
Removes the specified style from the collection.
- style
- Type:ig.excel.WorkbookStyle
- The style to remove from the collection.
Exceptions
Exception Description ig.InvalidOperationException style is the Normal style. -
removeAt
- .removeAt( index:number );
Removes the style at the specified index from the collection.
- index
- Type:number
- The zero-based index of the style in the collection.
Exceptions
Exception Description ig.ArgumentOutOfRangeException index is less than zero or index is greater than or equal to WorkbookStyleCollection.count. ig.InvalidOperationException The style to remove at index is the Normal style. -
reset
- .reset( );
Resets the collection to its original state by clearing all styles and adding in preset built in styles.