|
||
| Home Products Purchase Downloads Demos Forums Blogs Ticket Wiki API Corporate | ||
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.aspose.cells.Worksheets
public class Worksheets
Encapsulates a collection of Worksheet objects.
| Method Summary | |
|---|---|
int |
addCopy(int sheetIndex)
Adds a worksheet to the collection and copys data from an existed worksheet. |
int |
addCopy(java.lang.String sheetName)
Adds a worksheet to the collection and copys data from an existed worksheet. |
Worksheet |
addSheet()
Adds a new worksheet in this workbook. |
Worksheet |
addSheet(int type)
Adds a new worksheet in this workbook. |
Worksheet |
addSheet(int type,
java.lang.String sheetName)
Adds a new worksheet in this workbook with the specified sheet name. |
Worksheet |
addSheet(java.lang.String sheetName)
Adds a new worksheet in this workbook with the specified sheet name. |
Worksheet |
getActiveSheet()
Gets the active sheet. |
int |
getActiveSheetIndex()
Gets the active sheet index. |
BuiltInDocumentProperties |
getBuiltInDocumentProperties()
Returns a DocumentProperties collection that represents all the built-in document properties of the spreadsheet. |
CustomDocumentProperties |
getCustomDocumentProperties()
Returns a DocumentProperties collection that represents all the custom document properties of the spreadsheet. |
NamedRange[] |
getNamedRanges()
Gets all pre-defined named ranges in the spreadsheet. |
int |
getNumberOfSheets()
Deprecated. Replaced by size(). |
NamedRange |
getRangeByName(java.lang.String rangeName)
Gets NamedRange object by pre-defined name. |
Worksheet |
getSheet(int index)
Returns the sheet at the specified index. |
Worksheet |
getSheet(java.lang.String name)
Gets the sheet with the specified name. |
int |
getSheetIndex(java.lang.String name)
Gets the sheet's index according to its name. |
java.lang.String |
getSheetName(int index)
Returns the name of the sheet at the specified index. |
void |
moveSheet(int origin,
int dest)
Moves a worksheet. |
void |
removeSheet(int index)
Removes the sheet at the specified index. |
boolean |
removeSheet(java.lang.String sheetName)
Removes the specified sheet from the workbook. |
boolean |
removeSheet(Worksheet sheet)
Removes the specified worksheet. |
int |
size()
Gets the number of sheets in the workbook. |
void |
swapSheet(int idx1,
int idx2)
Swaps the positions of two sheets. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public Worksheet addSheet()
public Worksheet addSheet(int type)
type - Worksheet type.It could be one of the following values:
| SheetType.WORKSHEET |
| SheetType.CHART |
java.lang.IllegalArgumentException - if sheet type is not Worksheet or Chart.public Worksheet addSheet(java.lang.String sheetName)
sheetName - name of the worksheet.
public Worksheet addSheet(int type,
java.lang.String sheetName)
sheetName - name of the worksheet.type - Worksheet type.
java.lang.IllegalArgumentException - if sheet type is not Worksheet or Chart.addSheet(int)@Deprecated public int getNumberOfSheets()
size().
public int size()
public Worksheet getSheet(int index)
index - index of the sheet.
java.lang.IllegalArgumentException - if the index is out of range.public Worksheet getSheet(java.lang.String name)
name - name of the sheet.
public java.lang.String getSheetName(int index)
index - index of the sheet.
java.lang.IllegalArgumentException - if the index is out of range.
public void swapSheet(int idx1,
int idx2)
idx1 - index of the first sheetidx2 - index of the second sheet
java.lang.IllegalArgumentException - if any of the positions is out of range.
public void moveSheet(int origin,
int dest)
origin - the original index of the sheet.dest - the new index of the sheet.
java.lang.IllegalArgumentException - if any of the indexes is out of range.public void removeSheet(int index)
index - index of the sheet.
java.lang.IllegalArgumentException - if index is out of range.public boolean removeSheet(Worksheet sheet)
sheet - the sheet to remove.
public boolean removeSheet(java.lang.String sheetName)
sheetName - name of the sheet to remove
public int getActiveSheetIndex()
public Worksheet getActiveSheet()
public int getSheetIndex(java.lang.String name)
name - name of the sheet.
public int addCopy(int sheetIndex)
sheetIndex - Index of source worksheet.
public int addCopy(java.lang.String sheetName)
sheetName - name of source worksheet.
public NamedRange getRangeByName(java.lang.String rangeName)
rangeName - range name
public NamedRange[] getNamedRanges()
public BuiltInDocumentProperties getBuiltInDocumentProperties()
public CustomDocumentProperties getCustomDocumentProperties()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||