ig.excel.SheetCollection
Dependencies
-
add
- .add( name:string, type:ig.excel.SheetType );
- Return Type:
- ig.excel.Sheet
- Return Type Description:
- The Sheet created with the specified name.
Creates a new Sheet and adds it to the collection.
- name
- Type:string
- The name to give the new Sheet.
- type
- Type:ig.excel.SheetType
- An enumeration indicating the type of sheet to create
Exceptions
Exception Description ig.ArgumentNullException name is null or empty. ig.ArgumentException name contains the invalid characters: ':', '\', '/', '?', '*', '[', or ']'. ig.ArgumentException name exceeds 31 characters in length. ig.ArgumentException name is being used as the name of another sheet (sheet names are case-insensitively compared). Remarks
If the workbook originally had no sheets, the newly added sheet will become the selected sheet of the workbook. This can be changed after more sheets are added by setting the WindowOptions.selectedSheet of the Workbook.
See Also
-
clear
- .clear( );
Clears all sheets from the collection.
Remarks
If there are any NamedReference instances in the Workbook.namedReferences collection with a worksheet for a scope, they will be removed from the Workbook.
-
contains
- .contains( sheet:ig.excel.Sheet );
- Return Type:
- boolean
- Return Type Description:
- True if the sheet is found; False otherwise.
Determines whether a sheet is in the collection.
- sheet
- Type:ig.excel.Sheet
- The sheet to locate in the collection.
See Also
-
count
- .count( );
- Return Type:
- number
- Return Type Description:
- The number of sheets in the collection.
Gets the number of sheets in the collection.
-
exists
- .exists( name:string );
- Return Type:
- boolean
- Return Type Description:
- True if a sheet with the specified name is found; False otherwise.
Determines whether a sheet with the specified name exists in the collection.
- name
- Type:string
- The name of the sheet to search for. The name is compared case-insensitively.
-
indexOf
- .indexOf( sheet:ig.excel.Sheet );
- Return Type:
- number
- Return Type Description:
- The index of the specified sheet in the collection.
Gets the index of the specified sheet in the collection.
- sheet
- Type:ig.excel.Sheet
- The sheet of which to get the index.
See Also
-
item
- .item( index:number );
- Return Type:
- ig.excel.Sheet
- Return Type Description:
- The sheet at the specified index.
Gets the sheet at the specified index.
- index
- Type:number
- The zero-based index of the sheet to get.
Exceptions
Exception Description ig.ArgumentOutOfRangeException index is less than zero or index is greater than or equal to SheetCollection.count. See Also
-
item
- .item( name:string );
- Return Type:
- ig.excel.Sheet
- Return Type Description:
- The sheet with the specified name.
Gets the sheet with the specified name.
- name
- Type:string
- The name of the sheet to get.
Exceptions
Exception Description ig.InvalidOperationException A sheet with the specified name does not exist in the collection. Remarks
Sheet names are compared case-insensitively.
See Also
-
remove
- .remove( sheet:ig.excel.Sheet );
- Return Type:
- boolean
- Return Type Description:
- True if the sheet was successfully removed from the collection; False if the sheet did not exist in the collection.
Removes the specified sheet from the collection.
- sheet
- Type:ig.excel.Sheet
- The sheet to remove from the collection.
Remarks
If there are any NamedReference instances in the Workbook.namedReferences collection with the worksheet to remove as their scope, they will be removed from the Workbook.
See Also
-
removeAt
- .removeAt( index:number );
Removes the sheet at the specified index from the collection.
- index
- Type:number
- The index of the sheet to remove from the collection.
Exceptions
Exception Description ig.ArgumentOutOfRangeException index is less than zero or index is greater than or equal to SheetCollection.count. Remarks
If there are any NamedReference instances in the Workbook.namedReferences collection with the worksheet to remove as their scope, they will be removed from the Workbook.