接口 IWorksheets
- 所有超级接口:
Iterable<IWorksheet>
Represents a collection of all the sheets in the workbook.
-
方法概要
修饰符和类型方法说明add()
Creates a new worksheet.Creates a new sheet.addAfter
(IWorksheet sheet) Creates a new worksheet and inserts it after the specified sheet.addBefore
(IWorksheet sheet) Creates a new worksheet and inserts it before the specified sheet.boolean
contains
(IWorksheet worksheet) Returns true if the specified Worksheet is contained by the collection of worksheets; otherwise, false is returned.copy()
Copies the sheet collection to the end of the current workbook.Copies the sheet collection to the end of the specified workbook.copyAfter
(IWorksheet targetWorksheet) Copies the sheet collection to the location after the specified sheet.copyBefore
(IWorksheet targetWorksheet) Copies the sheet collection to the location before the specified sheet.get
(int index) Gets the worksheet using the index.Gets the worksheet using the name.Gets worksheets by names.int
getCount()
Returns the number of objects in the collection.int
indexOf
(IWorksheet worksheet) Returns the zero-based index of the specified worksheet in the collection.move()
Moves the sheet collection to the end of the current workbook.Copies the sheet collection to the end of the specified workbook.moveAfter
(IWorksheet targetWorksheet) Moves the sheet collection to the location after the specified sheet.moveBefore
(IWorksheet targetWorksheet) Moves the sheet collection to the location before the specified sheet.void
select()
Selects the object.void
select
(boolean replace) Selects the object.从接口继承的方法 java.lang.Iterable
forEach, iterator, spliterator
-
方法详细资料
-
getCount
int getCount()Returns the number of objects in the collection. -
get
Gets the worksheet using the index.- 参数:
index
- The index.
-
get
Gets the worksheet using the name.- 参数:
name
- The worksheet's name.
-
get
Gets worksheets by names.- 参数:
name
- An array that represents names of worksheets.
-
select
void select()Selects the object. -
select
void select(boolean replace) Selects the object.- 参数:
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
IWorksheet add()Creates a new worksheet. The new worksheet becomes the active sheet.- 返回:
- the new worksheet.
-
add
Creates a new sheet. The new sheet becomes the active sheet.- 参数:
type
- The sheet's type.- 返回:
- the new worksheet.
-
addAfter
Creates a new worksheet and inserts it after the specified sheet.- 参数:
sheet
- The insert sheet.- 返回:
- the new worksheet.
-
addBefore
Creates a new worksheet and inserts it before the specified sheet.- 参数:
sheet
- The specified sheet index.- 返回:
- the new worksheet.
-
contains
Returns true if the specified Worksheet is contained by the collection of worksheets; otherwise, false is returned.- 参数:
worksheet
- TheIWorksheet
object.- 返回:
- Returns whether the specified worksheet is contained by thecollection of worksheets.
-
copy
IWorksheets copy()Copies the sheet collection to the end of the current workbook.- 返回:
- The new copied sheet collection.
-
copy
Copies the sheet collection to the end of the specified workbook.- 参数:
targetWorkbook
- Specifies the workbook to which the sheet collection will be copied.- 返回:
- The new copied sheet collection.
-
copyAfter
Copies the sheet collection to the location after the specified sheet.- 参数:
targetWorksheet
- The sheet after which the copied sheet collection will be placed. It can be the sheet of the same or another workbook.- 返回:
- The new copied sheet collection.
-
copyBefore
Copies the sheet collection to the location before the specified sheet.- 参数:
targetWorksheet
- The sheet before which the copied sheet collection will be placed. It can be the sheet of the same or another workbook.- 返回:
- The new copied sheet collection.
-
move
IWorksheets move()Moves the sheet collection to the end of the current workbook.- 返回:
- The moved sheet collection.
-
move
Copies the sheet collection to the end of the specified workbook.- 参数:
targetWorkbook
- Specifies the workbook to which the sheet collection will be moved.- 返回:
- The moved sheet collection.
-
moveAfter
Moves the sheet collection to the location after the specified sheet.- 参数:
targetWorksheet
- The sheet after which the moved sheet collection will be placed. It can be the sheet of the same or another workbook.- 返回:
- The moved sheet collection.
-
moveBefore
Moves the sheet collection to the location before the specified sheet.- 参数:
targetWorksheet
- The sheet before which the moved sheet collection will be placed. It can be the sheet of the same or another workbook.- 返回:
- The moved sheet collection.
-
indexOf
Returns the zero-based index of the specified worksheet in the collection.- 参数:
worksheet
- TheIWorksheet
object.- 返回:
- Returns the zero-based index of the specified worksheet in thecollection.
-