接口 IWorksheets

所有超级接口:
Iterable<IWorksheet>

public interface IWorksheets extends Iterable<IWorksheet>
Represents a collection of all the sheets in the workbook.
  • 方法详细资料

    • getCount

      int getCount()
      Returns the number of objects in the collection.
    • get

      IWorksheet get(int index)
      Gets the worksheet using the index.
      参数:
      index - The index.
    • get

      IWorksheet get(String name)
      Gets the worksheet using the name.
      参数:
      name - The worksheet's name.
    • get

      IWorksheets get(String[] name)
      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

      IWorksheet add(SheetType type)
      Creates a new sheet. The new sheet becomes the active sheet.
      参数:
      type - The sheet's type.
      返回:
      the new worksheet.
    • addAfter

      IWorksheet addAfter(IWorksheet sheet)
      Creates a new worksheet and inserts it after the specified sheet.
      参数:
      sheet - The insert sheet.
      返回:
      the new worksheet.
    • addBefore

      IWorksheet addBefore(IWorksheet sheet)
      Creates a new worksheet and inserts it before the specified sheet.
      参数:
      sheet - The specified sheet index.
      返回:
      the new worksheet.
    • contains

      boolean contains(IWorksheet worksheet)
      Returns true if the specified Worksheet is contained by the collection of worksheets; otherwise, false is returned.
      参数:
      worksheet - The IWorksheet 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

      IWorksheets copy(IWorkbook targetWorkbook)
      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

      IWorksheets copyAfter(IWorksheet targetWorksheet)
      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

      IWorksheets copyBefore(IWorksheet targetWorksheet)
      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

      IWorksheets move(IWorkbook targetWorkbook)
      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

      IWorksheets moveAfter(IWorksheet targetWorksheet)
      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

      IWorksheets moveBefore(IWorksheet targetWorksheet)
      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

      int indexOf(IWorksheet worksheet)
      Returns the zero-based index of the specified worksheet in the collection.
      参数:
      worksheet - The IWorksheet object.
      返回:
      Returns the zero-based index of the specified worksheet in thecollection.