Interface IWorksheets
All Superinterfaces:
Iterable <IWorksheet >
Represents a collection of all the sheets in the workbook.
Method Summary
All Methods Instance Methods Abstract Methods
Creates a new worksheet and inserts it after the specified sheet.
Creates a new worksheet and inserts it before the specified sheet.
boolean
Returns true if the specified Worksheet is contained by the collection of worksheets; otherwise, false is returned.
Copies the sheet collection to the end of the current workbook.
Copies the sheet collection to the end of the specified workbook.
Copies the sheet collection to the location after the specified sheet.
Copies the sheet collection to the location before the specified sheet.
Gets the worksheet using the index.
Gets the worksheet using the name.
Gets worksheets by names.
int
Returns the number of objects in the collection.
int
Returns the zero-based index of the specified worksheet in the collection.
Moves the sheet collection to the end of the current workbook.
Copies the sheet collection to the end of the specified workbook.
Moves the sheet collection to the location after the specified sheet.
Moves the sheet collection to the location before the specified sheet.
void
void
Method Details
getCount
int getCount ()
Returns the number of objects in the collection.
get
Gets the worksheet using the index.
Parameters:
index
- The index.
get
Gets the worksheet using the name.
Parameters:
name
- The worksheet's name.
get
Gets worksheets by names.
Parameters:
name
- An array that represents names of worksheets.
select
void select ()
Selects the object.
select
void select (boolean replace)
Selects the object.
Parameters:
replace
- Used only with IWorkbook.Worksheets.True to replace the current selection with the specified object. False to extend the current selection to include any previously selected objects and the specified object.
add
Creates a new worksheet. The new worksheet becomes the active sheet.
Returns:
the new worksheet.
add
Creates a new sheet. The new sheet becomes the active sheet.
Parameters:
type
- The sheet's type.
Returns:
the new worksheet.
addAfter
Creates a new worksheet and inserts it after the specified sheet.
Parameters:
sheet
- The insert sheet.
Returns:
the new worksheet.
addBefore
Creates a new worksheet and inserts it before the specified sheet.
Parameters:
sheet
- The specified sheet index.
Returns:
the new worksheet.
contains
Returns true if the specified Worksheet is contained by the collection of worksheets; otherwise, false is returned.
Parameters:
worksheet
- The IWorksheet
object.
Returns:
Returns whether the specified worksheet is contained by thecollection of worksheets.
copy
Copies the sheet collection to the end of the current workbook.
Returns:
The new copied sheet collection.
copy
Copies the sheet collection to the end of the specified workbook.
Parameters:
targetWorkbook
- Specifies the workbook to which the sheet collection will be copied.
Returns:
The new copied sheet collection.
copyAfter
Copies the sheet collection to the location after the specified sheet.
Parameters:
targetWorksheet
- The sheet after which the copied sheet collection will be placed. It can be the sheet of the same or another workbook.
Returns:
The new copied sheet collection.
copyBefore
Copies the sheet collection to the location before the specified sheet.
Parameters:
targetWorksheet
- The sheet before which the copied sheet collection will be placed. It can be the sheet of the same or another workbook.
Returns:
The new copied sheet collection.
move
Moves the sheet collection to the end of the current workbook.
Returns:
The moved sheet collection.
move
Copies the sheet collection to the end of the specified workbook.
Parameters:
targetWorkbook
- Specifies the workbook to which the sheet collection will be moved.
Returns:
The moved sheet collection.
moveAfter
Moves the sheet collection to the location after the specified sheet.
Parameters:
targetWorksheet
- The sheet after which the moved sheet collection will be placed. It can be the sheet of the same or another workbook.
Returns:
The moved sheet collection.
moveBefore
Moves the sheet collection to the location before the specified sheet.
Parameters:
targetWorksheet
- The sheet before which the moved sheet collection will be placed. It can be the sheet of the same or another workbook.
Returns:
The moved sheet collection.
indexOf
Returns the zero-based index of the specified worksheet in the collection.
Parameters:
worksheet
- The IWorksheet
object.
Returns:
Returns the zero-based index of the specified worksheet in thecollection.