GridWorksheetCollection

Inheritance: java.lang.Object, com.aspose.gridweb.CollectionBase

public class GridWorksheetCollection extends CollectionBase

Encapsulates a collection of GridWorksheet objects.

Methods

MethodDescription
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:

ParameterTypeDescription
ojava.lang.ObjectThe 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:

ParameterTypeDescription
sheetNamejava.lang.StringWorksheet 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:

ParameterTypeDescription
sheetIndexintIndex 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:

ParameterTypeDescription
sheetNamejava.lang.StringName 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:

ParameterTypeDescription
ojava.lang.Objecttest object

Returns: boolean - Whether instance contains this object

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

get(int index)

public GridWorksheet get(int index)

Gets the GridWorksheet element at the specified index.

Parameters:

ParameterTypeDescription
indexintThe 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:

ParameterTypeDescription
sheetNamejava.lang.StringThe 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:

ParameterTypeDescription
ojava.lang.ObjectDetermines 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:

ParameterTypeDescription
indexintThe sheet index
sheetNamejava.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:

ParameterTypeDescription
indexintThe index value of the element to remove.

removeAt(String name)

public void removeAt(String name)

Removes the element at a specified name.

Parameters:

ParameterTypeDescription
namejava.lang.StringThe 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:

ParameterTypeDescription
valueint

setDefaultFontName(String value)

public void setDefaultFontName(String value)

Sets the control’s default font name.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setDefaultFontSize(FontUnit value)

public void setDefaultFontSize(FontUnit value)

?????????

Parameters:

ParameterTypeDescription
valueFontUnit

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:

ParameterTypeDescription
valuechar

setVisible(String sheetName, boolean isVisible)

public void setVisible(String sheetName, boolean isVisible)

Sets the visible for the sheet .

Parameters:

ParameterTypeDescription
sheetNamejava.lang.StringName of source worksheet.
isVisiblebooleanWhether the worksheet is visible

swapSheet(int sheetIndex1, int sheetIndex2)

public void swapSheet(int sheetIndex1, int sheetIndex2)

Swaps the two sheets.

Parameters:

ParameterTypeDescription
sheetIndex1intThe first worksheet.
sheetIndex2intThe 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:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int