GridWorksheetCollection
Inheritance: java.lang.Object, com.aspose.gridweb.CollectionBase
public class GridWorksheetCollection extends CollectionBase
Encapsulates a collection of GridWorksheet objects.
Methods
| Method | Description |
|---|---|
| add() | Adds a worksheet to the collection. |
| add(Object o) | Adds an item to the CollectionBase instance. |
| add(String sheetName) | Adds a worksheet to the collection. |
| addCopy(int sheetIndex) | Adds a worksheet to the collection and copies data from an existed worksheet. |
| addCopy(String sheetName) | Adds a worksheet to the collection and copies data from an existed worksheet. |
| calculateFormula() | Calculates the result of formulas. |
| clear() | Clear all worksheets. |
| contains(Object o) | Return whether instance contains this object |
| equals(Object arg0) | |
| get(int index) | Gets the GridWorksheet element at the specified index. |
| get(String sheetName) | Gets the GridWorksheet element with the specified name. |
| getActiveSheetIndex() | Represents the index of active worksheet when the spreadsheet is opened. |
| getClass() | |
| getCount() | Gets the size of enumerator |
| getDefaultFontName() | Gets the control’s default font name. |
| getDefaultFontSize() | ????????? |
| getNames() | Gets the collection of all the Name objects in the spreadsheet. |
| getNumberDecimalSeparator() | Gets the decimal separator for formatting/parsing numeric values. |
| hashCode() | |
| indexOf(Object o) | Determines the index of a specific item in the CollectionBase instance. |
| insert(int index, String sheetName) | Insert a worksheet. |
| iterator() | Gets the rows enumerator |
| notify() | |
| notifyAll() | |
| removeAt(int index) | Removes the element at a specified index. |
| removeAt(String name) | Removes the element at a specified name. |
| setActiveSheetIndex(int value) | Represents the index of active worksheet when the spreadsheet is opened. |
| setDefaultFontName(String value) | Sets the control’s default font name. |
| setDefaultFontSize(FontUnit value) | ????????? |
| setNumberDecimalSeparator(char value) | Sets the decimal separator for formatting/parsing numeric values. |
| setVisible(String sheetName, boolean isVisible) | Sets the visible for the sheet . |
| swapSheet(int sheetIndex1, int sheetIndex2) | Swaps the two sheets. |
| toString() | |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
add()
public int add()
Adds a worksheet to the collection.
Returns: int - GridWorksheet object index.
add(Object o)
public int add(Object o)
Adds an item to the CollectionBase instance.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| o | java.lang.Object | The Object to add to the CollectionBase instance. |
Returns: int - The position into which the new element was inserted.
add(String sheetName)
public GridWorksheet add(String sheetName)
Adds a worksheet to the collection.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| sheetName | java.lang.String | Worksheet name |
Returns: GridWorksheet - GridWorksheet object.
addCopy(int sheetIndex)
public int addCopy(int sheetIndex)
Adds a worksheet to the collection and copies data from an existed worksheet.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| sheetIndex | int | Index of source worksheet. |
Returns: int - GridWorksheet object index.
addCopy(String sheetName)
public int addCopy(String sheetName)
Adds a worksheet to the collection and copies data from an existed worksheet.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| sheetName | java.lang.String | Name of source worksheet. |
Returns: int - GridWorksheet object index.
calculateFormula()
public void calculateFormula()
Calculates the result of formulas.
clear()
public void clear()
Clear all worksheets.
Remarks
A workbook must contains a worksheet.
contains(Object o)
public boolean contains(Object o)
Return whether instance contains this object
Parameters:
| Parameter | Type | Description |
|---|---|---|
| o | java.lang.Object | test object |
Returns: boolean - Whether instance contains this object
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
get(int index)
public GridWorksheet get(int index)
Gets the GridWorksheet element at the specified index.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| index | int | The zero based index of the element. |
Returns: GridWorksheet - The element at the specified index.
get(String sheetName)
public GridWorksheet get(String sheetName)
Gets the GridWorksheet element with the specified name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| sheetName | java.lang.String | The name of the worksheet. |
Returns: GridWorksheet - The GridWorksheet with the name.
getActiveSheetIndex()
public int getActiveSheetIndex()
Represents the index of active worksheet when the spreadsheet is opened.
Remarks
Sheet index is zero based.
Returns: int
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getCount()
public int getCount()
Gets the size of enumerator
Returns: int
getDefaultFontName()
public String getDefaultFontName()
Gets the control’s default font name.
Example
GridWeb GridWeb1=new GridWeb();
GridWeb1.setDefaultFontName("Arial");
Returns: java.lang.String
getDefaultFontSize()
public FontUnit getDefaultFontSize()
?????????
Returns: FontUnit
getNames()
public GridNameCollection getNames()
Gets the collection of all the Name objects in the spreadsheet.
Returns: GridNameCollection
getNumberDecimalSeparator()
public char getNumberDecimalSeparator()
Gets the decimal separator for formatting/parsing numeric values. Default is the decimal separator of current Region.
Returns: char
hashCode()
public native int hashCode()
Returns: int
indexOf(Object o)
public int indexOf(Object o)
Determines the index of a specific item in the CollectionBase instance.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| o | java.lang.Object | Determines the index of a specific item in the CollectionBase instance. |
Returns: int - The index of value if found in the list; otherwise, -1.
insert(int index, String sheetName)
public GridWorksheet insert(int index, String sheetName)
Insert a worksheet.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| index | int | The sheet index |
| sheetName | java.lang.String |
Returns: GridWorksheet
iterator()
public Iterator iterator()
Gets the rows enumerator
Returns: java.util.Iterator - The rows enumerator
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
removeAt(int index)
public void removeAt(int index)
Removes the element at a specified index.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| index | int | The index value of the element to remove. |
removeAt(String name)
public void removeAt(String name)
Removes the element at a specified name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | java.lang.String | The name of the element to remove. |
setActiveSheetIndex(int value)
public void setActiveSheetIndex(int value)
Represents the index of active worksheet when the spreadsheet is opened.
Remarks
Sheet index is zero based.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int |
setDefaultFontName(String value)
public void setDefaultFontName(String value)
Sets the control’s default font name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String |
setDefaultFontSize(FontUnit value)
public void setDefaultFontSize(FontUnit value)
?????????
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | FontUnit |
setNumberDecimalSeparator(char value)
public void setNumberDecimalSeparator(char value)
Sets the decimal separator for formatting/parsing numeric values. Default is the decimal separator of current Region.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | char |
setVisible(String sheetName, boolean isVisible)
public void setVisible(String sheetName, boolean isVisible)
Sets the visible for the sheet .
Parameters:
| Parameter | Type | Description |
|---|---|---|
| sheetName | java.lang.String | Name of source worksheet. |
| isVisible | boolean | Whether the worksheet is visible |
swapSheet(int sheetIndex1, int sheetIndex2)
public void swapSheet(int sheetIndex1, int sheetIndex2)
Swaps the two sheets.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| sheetIndex1 | int | The first worksheet. |
| sheetIndex2 | int | The second worksheet. |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | long | |
| arg1 | int |