WebWorksheet

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

public class WebWorksheet extends Control

Represents a web worksheet.

Remarks

NOTE: This class is now obsolete. please use GridWorksheet Instead. This class will be removed after 6 months since Aug. 2014. Aspose apologizes for any inconvenience you may have experienced.

Example

Constructors

ConstructorDescription
WebWorksheet(MainWeb mw, GridWorksheet gwk)the constructor of the WebWorksheet.
WebWorksheet()the constructor of the WebWorksheet.

Methods

MethodDescription
autoFitColumn(int columnIndex)Autofits the column width.
autoFitColumn(int columnIndex, int startRow, int endRow)Autofits the column width.
cancelNewBindRow()Cancels and deletes the new added bind row.
commitNewBindRow()Commits the new added bind row and add it to the datasource.
copy(WebWorksheet source)Copies from another worksheet object.
createAutoGenratedColumns()After setting a datasource for the worksheet, call this method to generate the bind columns automatically.
createNewBindRow()Creates a new bind row and bind to the datasource.
createSubtotal(int columnNameRowIndex, int dataRows, int groupByColumnIndex, int subtotalFunction, int[] subtotalColumnIndexList, String functionLabel, GridTableItemStyle grandCellStyle, GridTableItemStyle subtotalCellStyle, int numberType, String customString)Creates subtotal in the sheet.
dataBind()Bind the sheet to the DataSource.
deleteBindRow(int rowNum)Deletes a bind row.
equals(Object arg0)
freezePanes(int row, int column, int freezedRows, int freezedColumns)Freezes panes at the specified cell in the worksheet.
getBindStartColumn()In data-binding mode, BindStartRow and BindStartColumn indicate the position of the grid to bind bo the datasource.
getBindStartRow()In data-binding mode, BindStartRow and BindStartColumn indicate the position of the grid to bind bo the datasource.
getBindingSource()The actually binding datasource object at run-time.
getClass()
getCurrentBindRows()Gets the binding rows number in data-binding mode.
getDataMember()Gets the DataMember from the multi-member DataSource.
getDataSource()Gets the DataSource.
getEnableCreateBindColumnHeader()In data-binding mode, indicates whether to create bind column header captions in the sheet.
getIndex()Gets the index of itself within the worksheets.
getName()Gets the name of the sheet.
getUniqueID()Gets the UniqueID in the Control
getValidations()Gets the data validation setting collection in the worksheet.
getVisible()Indicates whether this sheet’s name is shown in the sheet tabs of the control.
groupRows(int firstIndex, int lastIndex)Groups rows.
groupRows(int firstIndex, int lastIndex, boolean isHidden)Groups rows.
hashCode()
isProtected()Gets whether the worksheet is protected.
notify()
notifyAll()
setAllCellsEditable()Makes all cells editable.this is extended attribute
setAllCellsReadonly()Makes all cells readonly.this is extended attribute notice this attribute can not keep in actual cell,if you want to keep protect please use setProtect
setBindStartColumn(int value)In data-binding mode, BindStartRow and BindStartColumn indicate the position of the grid to bind bo the datasource.
setBindStartRow(int value)In data-binding mode, BindStartRow and BindStartColumn indicate the position of the grid to bind bo the datasource.
setCurrentBindRows(int value)Gets the binding rows number in data-binding mode.
setDataMember(String value)Sets the DataMember from the multi-member DataSource.
setDataSource(Object value)Sets the DataSource.
setEditableRange(int startRow, int startColumn, int rows, int columns)Makes a range of cells editable. http://docs.aspose.com:8082/docs/display/cellsnet/Protecting+Cells Make all cells read only by calling the SetAllCellsReadonly method.
setEnableCreateBindColumnHeader(boolean value)In data-binding mode, indicates whether to create bind column header captions in the sheet.
setName(String value)Sets the name of the sheet.
setProtected(boolean value)Sets whether the worksheet is protected.
setReadonlyRange(int startRow, int startColumn, int rows, int columns)Makes a range of cells readonly. http://docs.aspose.com:8082/docs/display/cellsnet/Protecting+Cells First make all cells editable by calling the SetAllCellsEditable method.
setVisible(boolean value)Indicates whether this sheet’s name is shown in the sheet tabs of the control.
toString()
unfreezePanes()Unfreezes panes in the worksheet.
ungroupRows(int firstIndex, int lastIndex)Ungroups rows.
wait()
wait(long arg0)
wait(long arg0, int arg1)

WebWorksheet(MainWeb mw, GridWorksheet gwk)

public WebWorksheet(MainWeb mw, GridWorksheet gwk)

the constructor of the WebWorksheet.

Parameters:

ParameterTypeDescription
mwMainWeb
gwkGridWorksheet

WebWorksheet()

public WebWorksheet()

the constructor of the WebWorksheet.

autoFitColumn(int columnIndex)

public void autoFitColumn(int columnIndex)

Autofits the column width.

Remarks

AutoFitColumn is an imprecise function.

Parameters:

ParameterTypeDescription
columnIndexintColumn index.

autoFitColumn(int columnIndex, int startRow, int endRow)

public void autoFitColumn(int columnIndex, int startRow, int endRow)

Autofits the column width. This method autofits a column based on content in a range of cells within the column from startRow to endRow. AutoFitColumn is an imprecise function.

Parameters:

ParameterTypeDescription
columnIndexintcolumn index, zero based
startRowintstart row index, zero based
endRowintend row index, zero based

cancelNewBindRow()

public int cancelNewBindRow()

Cancels and deletes the new added bind row.

Returns: int - The row index. If there is no new created bind row, returns -1.

commitNewBindRow()

public int commitNewBindRow()

Commits the new added bind row and add it to the datasource.

Returns: int - The row index of the new row. If no row is created, returns -1.

copy(WebWorksheet source)

public void copy(WebWorksheet source)

Copies from another worksheet object.

Parameters:

ParameterTypeDescription
sourceWebWorksheetThe other sheet.

createAutoGenratedColumns()

public void createAutoGenratedColumns()

After setting a datasource for the worksheet, call this method to generate the bind columns automatically.

createNewBindRow()

public int createNewBindRow()

Creates a new bind row and bind to the datasource.

Returns: int - The row index of the new row. If no row is created, returns -1.

createSubtotal(int columnNameRowIndex, int dataRows, int groupByColumnIndex, int subtotalFunction, int[] subtotalColumnIndexList, String functionLabel, GridTableItemStyle grandCellStyle, GridTableItemStyle subtotalCellStyle, int numberType, String customString)

public void createSubtotal(int columnNameRowIndex, int dataRows, int groupByColumnIndex, int subtotalFunction, int[] subtotalColumnIndexList, String functionLabel, GridTableItemStyle grandCellStyle, GridTableItemStyle subtotalCellStyle, int numberType, String customString)

Creates subtotal in the sheet.

Parameters:

ParameterTypeDescription
columnNameRowIndexintThe row index of the column name row.
dataRowsintThe number of the data rows.
groupByColumnIndexintThe column index of the column to be grouped.
subtotalFunctionintSubtotalFunction. The subtotal function type.
subtotalColumnIndexListint[]The column indexes to be subtotaled.
functionLabeljava.lang.StringThe label of subtotal function.
grandCellStyleGridTableItemStyleThe style of the grand total line.
subtotalCellStyleGridTableItemStyleThe style of the subtotal line.
numberTypeintNumberType. The number type of the subtotal result cells.
customStringjava.lang.StringThe custome format string of the subtotal result cells. Can be null.

dataBind()

public void dataBind()

Bind the sheet to the DataSource.

deleteBindRow(int rowNum)

public int deleteBindRow(int rowNum)

Deletes a bind row.

Parameters:

ParameterTypeDescription
rowNumintThe row index.

Returns: int - The deleted row index. If no bind row is deleted, returns -1.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

freezePanes(int row, int column, int freezedRows, int freezedColumns)

public void freezePanes(int row, int column, int freezedRows, int freezedColumns)

Freezes panes at the specified cell in the worksheet.

Remarks

Row index and column index cannot all be zero. Number of rows and number of columns also cannot all be zero.

The first two parameters specify the freezed position and the last two parameters specify the area freezed on the left top pane.

Parameters:

ParameterTypeDescription
rowintRow index.
columnintColumn index.
freezedRowsintNumber of visible rows in top pane, no more than row index.
freezedColumnsintNumber of visible columns in left pane, no more than column index.

getBindStartColumn()

public int getBindStartColumn()

In data-binding mode, BindStartRow and BindStartColumn indicate the position of the grid to bind bo the datasource.

Returns: int

getBindStartRow()

public int getBindStartRow()

In data-binding mode, BindStartRow and BindStartColumn indicate the position of the grid to bind bo the datasource.

Returns: int

getBindingSource()

public Iterable getBindingSource()

The actually binding datasource object at run-time. It is a DataView object when the DataSource property is a DataSet, DataTable or DataView object.

Returns: java.lang.Iterable

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getCurrentBindRows()

public int getCurrentBindRows()

Gets the binding rows number in data-binding mode.

Returns: int

getDataMember()

public String getDataMember()

Gets the DataMember from the multi-member DataSource. Generally it represents a DataTable object of a DataSet.

Returns: java.lang.String

getDataSource()

public Object getDataSource()

Gets the DataSource. Generally it’s a DataSet object.

Returns: java.lang.Object

getEnableCreateBindColumnHeader()

public boolean getEnableCreateBindColumnHeader()

In data-binding mode, indicates whether to create bind column header captions in the sheet.

Returns: boolean

getIndex()

public int getIndex()

Gets the index of itself within the worksheets.

Returns: int

getName()

public String getName()

Gets the name of the sheet.

Returns: java.lang.String

getUniqueID()

public String getUniqueID()

Gets the UniqueID in the Control

Returns: java.lang.String

getValidations()

public GridValidationCollection getValidations()

Gets the data validation setting collection in the worksheet.

Returns: GridValidationCollection

getVisible()

public boolean getVisible()

Indicates whether this sheet’s name is shown in the sheet tabs of the control.

Returns: boolean

groupRows(int firstIndex, int lastIndex)

public void groupRows(int firstIndex, int lastIndex)

Groups rows.

Parameters:

ParameterTypeDescription
firstIndexintThe first row index to be grouped.
lastIndexintThe last row index to be grouped.

groupRows(int firstIndex, int lastIndex, boolean isHidden)

public void groupRows(int firstIndex, int lastIndex, boolean isHidden)

Groups rows.

Parameters:

ParameterTypeDescription
firstIndexintThe first row index to be grouped.
lastIndexintThe last row index to be grouped.
isHiddenbooleanSpecifies if the grouped rows are hidden.

hashCode()

public native int hashCode()

Returns: int

isProtected()

public boolean isProtected()

Gets whether the worksheet is protected. When a worksheet is protected, all the cells can not be edit except the cell whose IsLocked property is false.

Returns: boolean

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setAllCellsEditable()

public void setAllCellsEditable()

Makes all cells editable.this is extended attribute

setAllCellsReadonly()

public void setAllCellsReadonly()

Makes all cells readonly.this is extended attribute notice this attribute can not keep in actual cell,if you want to keep protect please use setProtect

setBindStartColumn(int value)

public void setBindStartColumn(int value)

In data-binding mode, BindStartRow and BindStartColumn indicate the position of the grid to bind bo the datasource.

Parameters:

ParameterTypeDescription
valueint

setBindStartRow(int value)

public void setBindStartRow(int value)

In data-binding mode, BindStartRow and BindStartColumn indicate the position of the grid to bind bo the datasource.

Parameters:

ParameterTypeDescription
valueint

setCurrentBindRows(int value)

public void setCurrentBindRows(int value)

Gets the binding rows number in data-binding mode.

Parameters:

ParameterTypeDescription
valueint

setDataMember(String value)

public void setDataMember(String value)

Sets the DataMember from the multi-member DataSource. Generally it represents a DataTable object of a DataSet.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setDataSource(Object value)

public void setDataSource(Object value)

Sets the DataSource. Generally it’s a DataSet object.

Parameters:

ParameterTypeDescription
valuejava.lang.Object

setEditableRange(int startRow, int startColumn, int rows, int columns)

public void setEditableRange(int startRow, int startColumn, int rows, int columns)

Makes a range of cells editable. http://docs.aspose.com:8082/docs/display/cellsnet/Protecting+Cells Make all cells read only by calling the SetAllCellsReadonly method. then call this method to Specify the range of cells that to be editable

Parameters:

ParameterTypeDescription
startRowintThe start row of the range.
startColumnintThe start column of the range.
rowsintThe number of the rows.
columnsintThe number of the columns.

setEnableCreateBindColumnHeader(boolean value)

public void setEnableCreateBindColumnHeader(boolean value)

In data-binding mode, indicates whether to create bind column header captions in the sheet.

Parameters:

ParameterTypeDescription
valueboolean

setName(String value)

public void setName(String value)

Sets the name of the sheet.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setProtected(boolean value)

public void setProtected(boolean value)

Sets whether the worksheet is protected. When a worksheet is protected, all the cells can not be edit except the cell whose IsLocked property is false.

Parameters:

ParameterTypeDescription
valueboolean

setReadonlyRange(int startRow, int startColumn, int rows, int columns)

public void setReadonlyRange(int startRow, int startColumn, int rows, int columns)

Makes a range of cells readonly. http://docs.aspose.com:8082/docs/display/cellsnet/Protecting+Cells First make all cells editable by calling the SetAllCellsEditable method. then call this method to Specify the range of cells that to be readonly

Parameters:

ParameterTypeDescription
startRowintThe start row of the range.
startColumnintThe start column of the range.
rowsintThe number of the rows.
columnsintThe number of the columns.

setVisible(boolean value)

public void setVisible(boolean value)

Indicates whether this sheet’s name is shown in the sheet tabs of the control.

Parameters:

ParameterTypeDescription
valueboolean

toString()

public String toString()

Returns: java.lang.String

unfreezePanes()

public void unfreezePanes()

Unfreezes panes in the worksheet.

ungroupRows(int firstIndex, int lastIndex)

public void ungroupRows(int firstIndex, int lastIndex)

Ungroups rows.

Remarks

Only removes outter group info.

Parameters:

ParameterTypeDescription
firstIndexintThe first row index to be ungrouped.
lastIndexintThe last row index to be ungrouped.

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