com.spire.xls.core
Interface IWorksheets

All Superinterfaces:
java.lang.Iterable
All Known Implementing Classes:
WorksheetsCollection, XlsWorksheetsCollection

public interface IWorksheets
extends java.lang.Iterable

A collection of all the Worksheet objects in the specified or active workbook. Each Worksheet object represents a worksheet.


Method Summary
 IWorksheet addCopyAfter(IWorksheet toCopy)
          Adds copy of sheet to collection after choosed sheet.
 IWorksheet addCopyAfter(IWorksheet toCopy, IWorksheet sheetBefore)
          Adds copy of sheet to collection before choosed sheet.
 IWorksheet addCopyBefore(IWorksheet toCopy)
          Adds copy of sheet to collection before choosed sheet.
 IWorksheet addCopyBefore(IWorksheet toCopy, IWorksheet sheetAfter)
          Adds copy of sheet to collection before choosed sheet.
 IWorksheet create()
          Create a new worksheet.
 IWorksheet create(java.lang.String name)
          Create worksheet with specified name.
 IWorksheet get(int Index)
          Returns a single object from a collection.
 IWorksheet get(java.lang.String sheetName)
          Returns a single object from a collection.
 int getCount()
          Returns the number of objects in the collection.
 java.lang.Object getParent()
          Returns the parent object for the specified object.
 boolean getUseRangesCache()
          Indicates whether all created range objects should be cached.
 void remove(int index)
          Removes specified worksheet from the collection.
 void remove(IWorksheet sheet)
          Remove worksheet from collection.
 void remove(java.lang.String sheetName)
          Removes specified worksheet from the collection.
 

Method Detail

getCount

int getCount()
Returns the number of objects in the collection. Read-only Long.


get

IWorksheet get(int Index)
Returns a single object from a collection.


get

IWorksheet get(java.lang.String sheetName)
Returns a single object from a collection.


getParent

java.lang.Object getParent()
Returns the parent object for the specified object.


getUseRangesCache

boolean getUseRangesCache()
Indicates whether all created range objects should be cached.


create

IWorksheet create(java.lang.String name)
Create worksheet with specified name.

Parameters:
name - New name of worksheet. Must be unique for collection.
Returns:
Reference on created worksheet.

create

IWorksheet create()
Create a new worksheet.

Returns:
Reference on created worksheet.

remove

void remove(IWorksheet sheet)
Remove worksheet from collection.

Parameters:
sheet - Reference on worksheet to remove.

remove

void remove(java.lang.String sheetName)
Removes specified worksheet from the collection.

Parameters:
sheetName - Name of the sheet to remove.

remove

void remove(int index)
Removes specified worksheet from the collection.

Parameters:
index - Index of the sheet to remove.

addCopyBefore

IWorksheet addCopyBefore(IWorksheet toCopy)
Adds copy of sheet to collection before choosed sheet.

Parameters:
toCopy - Represents worksheet to copy.
Returns:
Returns copied sheet.

addCopyBefore

IWorksheet addCopyBefore(IWorksheet toCopy,
                         IWorksheet sheetAfter)
Adds copy of sheet to collection before choosed sheet.

Parameters:
toCopy - Represents worksheet to copy.
sheetAfter - Represents sheet that, in collection must be after copied sheet.
Returns:
Returns copied sheet.

addCopyAfter

IWorksheet addCopyAfter(IWorksheet toCopy)
Adds copy of sheet to collection after choosed sheet.

Parameters:
toCopy - Represents worksheet to copy.
Returns:
Returns copied sheet.

addCopyAfter

IWorksheet addCopyAfter(IWorksheet toCopy,
                        IWorksheet sheetBefore)
Adds copy of sheet to collection before choosed sheet.

Parameters:
toCopy - Represents worksheet to copy.
sheetBefore - Represents sheet that, in collection must be before copied sheet.
Returns:
Returns copied sheet.