GridCells

Inheritance: java.lang.Object

All Implemented Interfaces: java.lang.Iterable

public class GridCells implements Iterable

Encapsulates a collection of GridCell objects.

Methods

MethodDescription
cellIndexToName(int row, int column)Gets cell name according to its row and column indexes.
cellNameToIndex(String cellName, int row, int column)Gets the cell row and column indexes according to its name
checkCell(int row, int column)Gets the GridCell element or null at the specified cell row index and column index.
checkColumn(int col)Gets the GridColumn element or null at the specified column index.
checkRow(int i)Gets the GridRow element or null at the specified cell row index.
clear()Clear all cells in the collection.
clearContents(GridCellArea range)Clears contents of a range.
clearContents(int startRow, int startColumn, int endRow, int endColumn)Clears contents of a range.
clearFormats(GridCellArea range)Clears formatting of a range.
clearFormats(int startRow, int startColumn, int endRow, int endColumn)Clears formatting of a range.
clearRange(GridCellArea range)Clears contents and formatting of a range.
clearRange(int startRow, int startColumn, int endRow, int endColumn)Clears contents and formatting of a range.
columnIndexToName(int column)Gets column name according to column index.
columnNameToIndex(String columnName)Gets column index according to column name.
copyColumn(GridCells sourceCells, int sourceColumnIndex, int destinationColumnIndex)Copies data and formattings of a whole column.
copyColumns(GridCells sourceCells, int sourceColumnIndex, int destinationColumnIndex, int columnNumber)Copies data and formattings of a whole column.
copyRow(GridCells sourceCells, int sourceRowIndex, int destinationRowIndex)Copies data and formattings of a whole row.
copyRows(GridCells sourceCells, int sourceRowIndex, int destinationRowIndex, int rowNumber)Copies data and formattings of some whole rows.
deleteBlankColumns()Delete all blank columns which do not contain any data.
deleteBlankRows()Delete all blank rows which do not contain any data.
deleteColumn(int columnIndex)Deletes a column.
deleteColumn(int columnIndex, boolean updateReference)Deletes a column.
deleteColumns(int columnIndex, int totalColumns, boolean updateReference)Deletes several columns.
deleteRange(int startRow, int startColumn, int endRow, int endColumn, int shiftType)Deletes a range of cells and shift cells according to the shift option.
deleteRow(int rowIndex)Deletes a row.
deleteRows(int rowIndex, int totalRows)Deletes several rows.
deleteRows(int rowIndex, int totalRows, boolean updateReference)Deletes multiple rows in the worksheet.
equals(Object arg0)
exportArray(int firstRow, int firstColumn, int totalRows, int totalColumns)Exports data in the GridCells collection to a two-dimension array object.
get(int row, int column)Gets the GridCell element at the specified cell row index and column index.
get(String cellName)Gets the GridCell element at the specified cell name.
getCell(int row, int column)Gets the GridCell element at the specified cell row index and column index.
getClass()
getColumnWidth(int column)Gets the width of the specified column
getColumnWidthInch(int column)Gets the width of the specified column, in units of inches.
getColumnWidthPixel(int column)Gets the width of the specified column, in units of pixel.
getColumns()
getCount()Gets the number of cells.
getFirstCell()
getLastCell()
getMaxColumn()Maximum column index of cell which contains data or style.
getMaxDataColumn()
getMaxDataRow()
getMaxRow()Maximum row index of cell which contains data or style.
getMergedCells()Gets the collection of merged cells.
getMinColumn()
getMinDataColumn()
getMinDataRow()
getMinRow()
getRow(int i)Gets the GridRow element or at the specified cell row index.
getRowEnumerator()Gets the rows enumerator
getRowHeight(int row)Gets the height of a specified row.
getRowHeightInch(int row)Gets the height of a specified row in unit of inches.
getRowHeightPixel(int row)Gets the height of a specified row in unit of pixel.
getRowOutlineLevel(int rowIndex)Gets the outline level of the row.
getRows()
getStandardHeight()Gets the default row height in this worksheet,in unit of points.
getStandardHeightPixels()Gets the default row height in this worksheet,in unit of pixels.
getStandardWidth()Gets the default column width in the worksheet,in unit of characters.
getStandardWidthInch()
getStandardWidthPixels()
getViewColumnWidthPixel(int column)Get the width in different view type.
groupColumns(int firstIndex, int lastIndex)Groups columns.
groupColumns(int firstIndex, int lastIndex, boolean isHidden)Groups columns.
groupRows(int firstIndex, int lastIndex)Groups rows.
hashCode()
hideColumn(int column)Hides a column.
hideRow(int row)Hides a row.
insertColumn(int columnIndex)Inserts a new column into the worksheet.
insertColumn(int columnIndex, boolean updateReference)Inserts a new column into the worksheet.
insertColumns(int columnIndex, int totalColumns)Inserts some columns into the worksheet.
insertColumns(int columnIndex, int totalColumns, boolean updateReference)Inserts some columns into the worksheet.
insertRange(GridCellArea area, int shiftType)Inserts a range of cells and shift cells according to the shift option.
insertRange(GridCellArea area, int shiftNumber, int shiftType, boolean updateReference)Inserts a range of cells and shift cells according to the shift option.
insertRow(int rowIndex)Inserts a new row into the worksheet.
insertRows(int rowIndex, int totalRows)Inserts multiple rows into the worksheet.
insertRows(int rowIndex, int totalRows, boolean updateReference)Inserts multiple rows into the worksheet.
isBlankColumn(int columnIndex)Checks whether given column is blank(does not contain any data).
isColumnHidden(int columnIndex)Checks whether a column at given index is hidden.
isRowHidden(int rowIndex)Checks whether a row at given index is hidden.
iterator()Gets the rows enumerator
merge(int firstRow, int firstColumn, int totalRows, int totalColumns)Merges a specified range of cells into a single cell.
moveRange(GridCellArea sourceArea, int destRow, int destColumn)Moves the range.
notify()
notifyAll()
removeFormulas()Removes all formula and replaces with the value of the formula.
setBorders(int firstRow, int firstColumn, int rowNumber, int columnNumber, int position, WebBorderStyle borderStyle)Sets borders for a cells range.
setColumnWidth(int column, double width)Sets the width of the specified column.
setColumnWidthInch(int column, double inches)Sets column width in unit of inches.
setColumnWidthPixel(int column, int pixel)Sets column width in unit of pixels.
setRowHeight(int row, double height)Sets the height of the specified row.
setRowHeightInch(int row, double inches)Sets row height in unit of inches.
setRowHeightPixel(int row, int pixels)Sets row height in unit of pixels.
setRowOutlineLevel(int rowIndex, int outlineLevel)Sets the outline level of the row.
setStandardHeight(double value)Sets the default row height in this worksheet,in unit of points.
setStandardHeightPixels(int value)Sets the default row height in this worksheet,in unit of pixels.
setStandardWidth(double value)Sets the default column width in the worksheet,in unit of characters.
setStandardWidthInch(double value)
setStandardWidthPixels(int value)
setStyle(int firstRow, int firstColumn, int rowNumber, int columnNumber, GridTableItemStyle style)Sets the style to a specified range of cells.
setStyle(String cellRange, GridTableItemStyle style)Sets the style to a specified range of cells.
sort(int startRow, int startColumn, int rows, int columns, int index, boolean isAsending, boolean isCaseSensitive, boolean islefttoright)Sorts the datas ascend/decend top to bottom in a range of a Worksheet by specified column index.
sort(int startRow, int startColumn, int rows, int columns, int[] indexes, int[] orders, int orientation, boolean isCaseSensitive)Sorts the datas ascend/decend top to bottom in a range of a Worksheet by specified column index.
toString()
unMerge(int firstRow, int firstColumn, int totalRows, int totalColumns)Unmerges a specified range of merged cells.
ungroupColumns(int firstIndex, int lastIndex)Ungroups columns.
ungroupRows(int firstIndex, int lastIndex)Ungroups rows.
unhideColumn(int column, double width)Unhides a column
unhideRow(int row)Unhides a row.
wait()
wait(long arg0)
wait(long arg0, int arg1)

cellIndexToName(int row, int column)

public static String cellIndexToName(int row, int column)

Gets cell name according to its row and column indexes.

Parameters:

ParameterTypeDescription
rowintRow index.
columnintColumn index.

Returns: java.lang.String - Name of cell.

cellNameToIndex(String cellName, int row, int column)

public static void cellNameToIndex(String cellName, int row, int column)

Gets the cell row and column indexes according to its name

Parameters:

ParameterTypeDescription
cellNamejava.lang.StringName of cell.
rowintOutput row index
columnintOutput column index

checkCell(int row, int column)

public GridCell checkCell(int row, int column)

Gets the GridCell element or null at the specified cell row index and column index.

Parameters:

ParameterTypeDescription
rowintRow index
columnintColumn index

Returns: GridCell - Return GridCell object if a GridCell object exists. Return null if the GridCell does not exist.

checkColumn(int col)

public GridColumn checkColumn(int col)

Gets the GridColumn element or null at the specified column index.

Parameters:

ParameterTypeDescription
colintThe column index.

Returns: GridColumn - The Column object.

checkRow(int i)

public GridRow checkRow(int i)

Gets the GridRow element or null at the specified cell row index.

Parameters:

ParameterTypeDescription
iintRow index

Returns: GridRow - Returns GridRow object If the row object does exist, otherwise returns null.

clear()

public void clear()

Clear all cells in the collection.

clearContents(GridCellArea range)

public void clearContents(GridCellArea range)

Clears contents of a range.

Parameters:

ParameterTypeDescription
rangeGridCellAreaRange to be cleared.

clearContents(int startRow, int startColumn, int endRow, int endColumn)

public void clearContents(int startRow, int startColumn, int endRow, int endColumn)

Clears contents of a range.

Parameters:

ParameterTypeDescription
startRowintStart row index.
startColumnintStart column index.
endRowintEnd row index.
endColumnintEnd column index.

clearFormats(GridCellArea range)

public void clearFormats(GridCellArea range)

Clears formatting of a range.

Parameters:

ParameterTypeDescription
rangeGridCellAreaRange to be cleared.

clearFormats(int startRow, int startColumn, int endRow, int endColumn)

public void clearFormats(int startRow, int startColumn, int endRow, int endColumn)

Clears formatting of a range.

Parameters:

ParameterTypeDescription
startRowintStart row index.
startColumnintStart column index.
endRowintEnd row index.
endColumnintEnd column index.

clearRange(GridCellArea range)

public void clearRange(GridCellArea range)

Clears contents and formatting of a range.

Parameters:

ParameterTypeDescription
rangeGridCellAreaRange to be cleared.

clearRange(int startRow, int startColumn, int endRow, int endColumn)

public void clearRange(int startRow, int startColumn, int endRow, int endColumn)

Clears contents and formatting of a range.

Parameters:

ParameterTypeDescription
startRowintStart row index.
startColumnintStart column index.
endRowintEnd row index.
endColumnintEnd column index.

columnIndexToName(int column)

public static String columnIndexToName(int column)

Gets column name according to column index.

Parameters:

ParameterTypeDescription
columnintColumn index.

Returns: java.lang.String - Name of column.

columnNameToIndex(String columnName)

public static int columnNameToIndex(String columnName)

Gets column index according to column name.

Parameters:

ParameterTypeDescription
columnNamejava.lang.StringColumn name.

Returns: int - Column index.

copyColumn(GridCells sourceCells, int sourceColumnIndex, int destinationColumnIndex)

public void copyColumn(GridCells sourceCells, int sourceColumnIndex, int destinationColumnIndex)

Copies data and formattings of a whole column.

Parameters:

ParameterTypeDescription
sourceCellsGridCellsSource Cells object contains data and formattings to copy.
sourceColumnIndexintSource column index.
destinationColumnIndexintDestination column index.

copyColumns(GridCells sourceCells, int sourceColumnIndex, int destinationColumnIndex, int columnNumber)

public void copyColumns(GridCells sourceCells, int sourceColumnIndex, int destinationColumnIndex, int columnNumber)

Copies data and formattings of a whole column.

Parameters:

ParameterTypeDescription
sourceCellsGridCellsSource Cells object contains data and formattings to copy.
sourceColumnIndexintSource column index.
destinationColumnIndexintDestination column index.
columnNumberintThe copied column number.

copyRow(GridCells sourceCells, int sourceRowIndex, int destinationRowIndex)

public void copyRow(GridCells sourceCells, int sourceRowIndex, int destinationRowIndex)

Copies data and formattings of a whole row.

Parameters:

ParameterTypeDescription
sourceCellsGridCellsSource Cells object contains data and formattings to copy.
sourceRowIndexintSource row index.
destinationRowIndexintDestination row index.

copyRows(GridCells sourceCells, int sourceRowIndex, int destinationRowIndex, int rowNumber)

public void copyRows(GridCells sourceCells, int sourceRowIndex, int destinationRowIndex, int rowNumber)

Copies data and formattings of some whole rows.

Parameters:

ParameterTypeDescription
sourceCellsGridCellsSource Cells object contains data and formattings to copy.
sourceRowIndexintSource row index.
destinationRowIndexintDestination row index.
rowNumberintThe copied row number.

deleteBlankColumns()

public void deleteBlankColumns()

Delete all blank columns which do not contain any data.

deleteBlankRows()

public void deleteBlankRows()

Delete all blank rows which do not contain any data.

deleteColumn(int columnIndex)

public void deleteColumn(int columnIndex)

Deletes a column.

Parameters:

ParameterTypeDescription
columnIndexintColumn index.

deleteColumn(int columnIndex, boolean updateReference)

public void deleteColumn(int columnIndex, boolean updateReference)

Deletes a column.

Parameters:

ParameterTypeDescription
columnIndexintColumn index.
updateReferencebooleanIndicates if update references in other worksheets.

deleteColumns(int columnIndex, int totalColumns, boolean updateReference)

public void deleteColumns(int columnIndex, int totalColumns, boolean updateReference)

Deletes several columns.

Parameters:

ParameterTypeDescription
columnIndexintColumn index.
totalColumnsintNumber of columns to be deleted.
updateReferencebooleanIndicates if update references in other worksheets.

deleteRange(int startRow, int startColumn, int endRow, int endColumn, int shiftType)

public void deleteRange(int startRow, int startColumn, int endRow, int endColumn, int shiftType)

Deletes a range of cells and shift cells according to the shift option.

Parameters:

ParameterTypeDescription
startRowintStart row index.
startColumnintStart column index.
endRowintEnd row index.
endColumnintEnd column index.
shiftTypeintGridShiftType. Shift cells option.

deleteRow(int rowIndex)

public void deleteRow(int rowIndex)

Deletes a row.

Parameters:

ParameterTypeDescription
rowIndexintRow index.

deleteRows(int rowIndex, int totalRows)

public boolean deleteRows(int rowIndex, int totalRows)

Deletes several rows.

Remarks

If the deleted range contains the top part(not whole) of the table(ListObject), the ranged could not be deleted and nothing will be done.It works as MS Excel.

Parameters:

ParameterTypeDescription
rowIndexintThe first row index to be deleted.
totalRowsintNumber of rows to be deleted.

Returns: boolean

deleteRows(int rowIndex, int totalRows, boolean updateReference)

public boolean deleteRows(int rowIndex, int totalRows, boolean updateReference)

Deletes multiple rows in the worksheet.

Parameters:

ParameterTypeDescription
rowIndexintRow index.
totalRowsintNumber of rows to be deleted.
updateReferencebooleanIndicates if update references in other worksheets.

Returns: boolean -

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

exportArray(int firstRow, int firstColumn, int totalRows, int totalColumns)

public Object[][] exportArray(int firstRow, int firstColumn, int totalRows, int totalColumns)

Exports data in the GridCells collection to a two-dimension array object.

Parameters:

ParameterTypeDescription
firstRowintThe row number of the first cell to export out.
firstColumnintThe column number of the first cell to export out.
totalRowsintNumber of rows to be exported
totalColumnsintNumber of columns to be exported

Returns: java.lang.Object[][] - Exported cell value array object.

get(int row, int column)

public GridCell get(int row, int column)

Gets the GridCell element at the specified cell row index and column index.

Example

         GridWeb GridWeb1 = new GridWeb();
         GridCells cells = GridWeb1.getWorkSheets().get(0).getCells();
         //Gets the cell at "A1"
         GridCell cell = cells.get(0, 0);

Parameters:

ParameterTypeDescription
rowintRow index.
columnintColumn index.

Returns: GridCell - The GridCell object.

get(String cellName)

public GridCell get(String cellName)

Gets the GridCell element at the specified cell name.

Example

         GridWeb GridWeb1 = new GridWeb();
          GridCells cells = GridWeb1.getWorkSheets().get(0).getCells();
          GridCell cell = cells.get("A1");	//Gets the cell at "A1"

Parameters:

ParameterTypeDescription
cellNamejava.lang.StringCell name,including its column letter and row number, for example A5.

Returns: GridCell - A GridCell object

getCell(int row, int column)

public GridCell getCell(int row, int column)

Gets the GridCell element at the specified cell row index and column index.

Parameters:

ParameterTypeDescription
rowintRow index
columnintColumn index

Returns: GridCell - Return Cell object

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getColumnWidth(int column)

public double getColumnWidth(int column)

Gets the width of the specified column

Parameters:

ParameterTypeDescription
columnintColumn index

Returns: double - Width of column

getColumnWidthInch(int column)

public double getColumnWidthInch(int column)

Gets the width of the specified column, in units of inches.

Parameters:

ParameterTypeDescription
columnintColumn index

Returns: double - Width of column

getColumnWidthPixel(int column)

public int getColumnWidthPixel(int column)

Gets the width of the specified column, in units of pixel.

Parameters:

ParameterTypeDescription
columnintColumn index

Returns: int - Width of column in normal view.

getColumns()

public GridColumnCollection getColumns()

Returns: GridColumnCollection

getCount()

public int getCount()

Gets the number of cells.

Returns: int

getFirstCell()

public GridCell getFirstCell()

Returns: GridCell

getLastCell()

public GridCell getLastCell()

Returns: GridCell

getMaxColumn()

public int getMaxColumn()

Maximum column index of cell which contains data or style.

Remarks

Return -1 if ther is not cell.

Returns: int

getMaxDataColumn()

public int getMaxDataColumn()

Returns: int

getMaxDataRow()

public int getMaxDataRow()

Returns: int

getMaxRow()

public int getMaxRow()

Maximum row index of cell which contains data or style.

Remarks

Return -1 if there is no cell whiche contains data or style in the worksheet.

Returns: int

getMergedCells()

public ArrayList getMergedCells()

Gets the collection of merged cells.

Remarks

In this collection, each item is a GridCellArea structure which represents an area of merged cells.

Returns: java.util.ArrayList

getMinColumn()

public int getMinColumn()

Returns: int

getMinDataColumn()

public int getMinDataColumn()

Returns: int

getMinDataRow()

public int getMinDataRow()

Returns: int

getMinRow()

public int getMinRow()

Returns: int

getRow(int i)

public GridRow getRow(int i)

Gets the GridRow element or at the specified cell row index.

Parameters:

ParameterTypeDescription
iintRow index

Returns: GridRow - the row object

getRowEnumerator()

public Iterator getRowEnumerator()

Gets the rows enumerator

Returns: java.util.Iterator - The rows enuerator.

getRowHeight(int row)

public double getRowHeight(int row)

Gets the height of a specified row.

Parameters:

ParameterTypeDescription
rowintRow index

Returns: double - Height of row

getRowHeightInch(int row)

public double getRowHeightInch(int row)

Gets the height of a specified row in unit of inches.

Parameters:

ParameterTypeDescription
rowintRow index

Returns: double - Height of row

getRowHeightPixel(int row)

public int getRowHeightPixel(int row)

Gets the height of a specified row in unit of pixel.

Parameters:

ParameterTypeDescription
rowintRow index

Returns: int - Height of row

getRowOutlineLevel(int rowIndex)

public int getRowOutlineLevel(int rowIndex)

Gets the outline level of the row.

Parameters:

ParameterTypeDescription
rowIndexintrow index.

Returns: int - the outline level.

getRows()

public GridRowCollection getRows()

Returns: GridRowCollection

getStandardHeight()

public double getStandardHeight()

Gets the default row height in this worksheet,in unit of points.

Returns: double

getStandardHeightPixels()

public int getStandardHeightPixels()

Gets the default row height in this worksheet,in unit of pixels.

Returns: int

getStandardWidth()

public double getStandardWidth()

Gets the default column width in the worksheet,in unit of characters.

Returns: double

getStandardWidthInch()

public double getStandardWidthInch()

Returns: double

getStandardWidthPixels()

public int getStandardWidthPixels()

Returns: int

getViewColumnWidthPixel(int column)

public int getViewColumnWidthPixel(int column)

Get the width in different view type.

Parameters:

ParameterTypeDescription
columnintThe column index.

Returns: int - the column width in unit of pixels

groupColumns(int firstIndex, int lastIndex)

public void groupColumns(int firstIndex, int lastIndex)

Groups columns.

Parameters:

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

groupColumns(int firstIndex, int lastIndex, boolean isHidden)

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

Groups columns.

Parameters:

ParameterTypeDescription
firstIndexintThe first column index to be grouped.
lastIndexintThe last column index to be grouped.
isHiddenbooleanSpecifies if the grouped columns are hidden.

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.

hashCode()

public native int hashCode()

Returns: int

hideColumn(int column)

public void hideColumn(int column)

Hides a column.

Parameters:

ParameterTypeDescription
columnintColumn index.

hideRow(int row)

public void hideRow(int row)

Hides a row.

Parameters:

ParameterTypeDescription
rowintRow index.

insertColumn(int columnIndex)

public void insertColumn(int columnIndex)

Inserts a new column into the worksheet.

Parameters:

ParameterTypeDescription
columnIndexintColumn index.

insertColumn(int columnIndex, boolean updateReference)

public void insertColumn(int columnIndex, boolean updateReference)

Inserts a new column into the worksheet.

Parameters:

ParameterTypeDescription
columnIndexintColumn index.
updateReferencebooleanIndicates if references in other worksheets will be updated.

insertColumns(int columnIndex, int totalColumns)

public void insertColumns(int columnIndex, int totalColumns)

Inserts some columns into the worksheet.

Parameters:

ParameterTypeDescription
columnIndexintColumn index.
totalColumnsintThe number of columns.

insertColumns(int columnIndex, int totalColumns, boolean updateReference)

public void insertColumns(int columnIndex, int totalColumns, boolean updateReference)

Inserts some columns into the worksheet.

Parameters:

ParameterTypeDescription
columnIndexintColumn index.
totalColumnsintThe number of columns.
updateReferencebooleanIndicates if references in other worksheets will be updated.

insertRange(GridCellArea area, int shiftType)

public void insertRange(GridCellArea area, int shiftType)

Inserts a range of cells and shift cells according to the shift option.

Parameters:

ParameterTypeDescription
areaGridCellAreaShift area.
shiftTypeintGridShiftType. Shift cells option.

insertRange(GridCellArea area, int shiftNumber, int shiftType, boolean updateReference)

public void insertRange(GridCellArea area, int shiftNumber, int shiftType, boolean updateReference)

Inserts a range of cells and shift cells according to the shift option.

Parameters:

ParameterTypeDescription
areaGridCellAreaShift area.
shiftNumberintNumber of rows or columns to be inserted.
shiftTypeintGridShiftType. Shift cells option.
updateReferencebooleanIndicates if update references in other worksheets.

insertRow(int rowIndex)

public void insertRow(int rowIndex)

Inserts a new row into the worksheet.

Parameters:

ParameterTypeDescription
rowIndexintRow index.

insertRows(int rowIndex, int totalRows)

public void insertRows(int rowIndex, int totalRows)

Inserts multiple rows into the worksheet.

Parameters:

ParameterTypeDescription
rowIndexintRow index.
totalRowsintNumber of rows to be inserted.

insertRows(int rowIndex, int totalRows, boolean updateReference)

public void insertRows(int rowIndex, int totalRows, boolean updateReference)

Inserts multiple rows into the worksheet.

Parameters:

ParameterTypeDescription
rowIndexintRow index.
totalRowsintNumber of rows to be inserted.
updateReferencebooleanIndicates if references in other worksheets will be updated.

isBlankColumn(int columnIndex)

public boolean isBlankColumn(int columnIndex)

Checks whether given column is blank(does not contain any data).

Parameters:

ParameterTypeDescription
columnIndexintthe column index

Returns: boolean - true if given column does not contain any data

isColumnHidden(int columnIndex)

public boolean isColumnHidden(int columnIndex)

Checks whether a column at given index is hidden.

Parameters:

ParameterTypeDescription
columnIndexintcolumn index

Returns: boolean - true if the column is hidden.

isRowHidden(int rowIndex)

public boolean isRowHidden(int rowIndex)

Checks whether a row at given index is hidden.

Parameters:

ParameterTypeDescription
rowIndexintrow index

Returns: boolean - true if the row is hidden

iterator()

public Iterator iterator()

Gets the rows enumerator

Returns: java.util.Iterator - The rows enumerator

merge(int firstRow, int firstColumn, int totalRows, int totalColumns)

public void merge(int firstRow, int firstColumn, int totalRows, int totalColumns)

Merges a specified range of cells into a single cell.

Remarks

Reference the merged cell via the address of the upper-left cell in the range.

Parameters:

ParameterTypeDescription
firstRowintFirst row of this range(zero based)
firstColumnintFirst column of this range(zero based)
totalRowsintNumber of rows(one based)
totalColumnsintNumber of columns(one based)

moveRange(GridCellArea sourceArea, int destRow, int destColumn)

public void moveRange(GridCellArea sourceArea, int destRow, int destColumn)

Moves the range.

Parameters:

ParameterTypeDescription
sourceAreaGridCellAreaThe range which should be moved.
destRowintThe dest row.
destColumnintThe dest column.

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

removeFormulas()

public void removeFormulas()

Removes all formula and replaces with the value of the formula.

setBorders(int firstRow, int firstColumn, int rowNumber, int columnNumber, int position, WebBorderStyle borderStyle)

public void setBorders(int firstRow, int firstColumn, int rowNumber, int columnNumber, int position, WebBorderStyle borderStyle)

Sets borders for a cells range.

Example

           GridWeb GridWeb1 = new GridWeb();
           WebBorderStyle borderStyle1 = new WebBorderStyle();
         	 GridWeb1.getWorkSheets().get(0).getCells().setBorders(0, 0, 5, 8, SetBorderPosition.OUTLINE, borderStyle1);

Parameters:

ParameterTypeDescription
firstRowintThe first row number of the range(zero based).
firstColumnintThe first column number of the range(zero based).
rowNumberintThe rows number.
columnNumberintThe columns number.
positionintSetBorderPosition. The border position.
borderStyleWebBorderStyleThe border style.

setColumnWidth(int column, double width)

public void setColumnWidth(int column, double width)

Sets the width of the specified column.

Remarks

To hide a column, sets column width to zero.

Parameters:

ParameterTypeDescription
columnintColumn index.
widthdoubleWidth of column.Column width must be between 0 and 255.

setColumnWidthInch(int column, double inches)

public void setColumnWidthInch(int column, double inches)

Sets column width in unit of inches.

Parameters:

ParameterTypeDescription
columnintColumn index.
inchesdoubleNumber of inches.

setColumnWidthPixel(int column, int pixel)

public void setColumnWidthPixel(int column, int pixel)

Sets column width in unit of pixels.

Parameters:

ParameterTypeDescription
columnintColumn index.
pixelintNumber of pixels.

setRowHeight(int row, double height)

public void setRowHeight(int row, double height)

Sets the height of the specified row.

Remarks

To hide a row, sets row height to zero.

Parameters:

ParameterTypeDescription
rowintRow index.
heightdoubleHeight of row.In unit of point It should be between 0 and 409.5.

setRowHeightInch(int row, double inches)

public void setRowHeightInch(int row, double inches)

Sets row height in unit of inches.

Parameters:

ParameterTypeDescription
rowintRow index.
inchesdoubleNumber of inches.It should be between 0 and 409.5/72.

setRowHeightPixel(int row, int pixels)

public void setRowHeightPixel(int row, int pixels)

Sets row height in unit of pixels.

Parameters:

ParameterTypeDescription
rowintRow index.
pixelsintNumber of pixels.

setRowOutlineLevel(int rowIndex, int outlineLevel)

public void setRowOutlineLevel(int rowIndex, int outlineLevel)

Sets the outline level of the row.

Parameters:

ParameterTypeDescription
rowIndexintrow index.
outlineLevelintoutline level.

setStandardHeight(double value)

public void setStandardHeight(double value)

Sets the default row height in this worksheet,in unit of points.

Parameters:

ParameterTypeDescription
valuedouble

setStandardHeightPixels(int value)

public void setStandardHeightPixels(int value)

Sets the default row height in this worksheet,in unit of pixels.

Parameters:

ParameterTypeDescription
valueint

setStandardWidth(double value)

public void setStandardWidth(double value)

Sets the default column width in the worksheet,in unit of characters.

Parameters:

ParameterTypeDescription
valuedouble

setStandardWidthInch(double value)

public void setStandardWidthInch(double value)

Parameters:

ParameterTypeDescription
valuedouble

setStandardWidthPixels(int value)

public void setStandardWidthPixels(int value)

Parameters:

ParameterTypeDescription
valueint

setStyle(int firstRow, int firstColumn, int rowNumber, int columnNumber, GridTableItemStyle style)

public void setStyle(int firstRow, int firstColumn, int rowNumber, int columnNumber, GridTableItemStyle style)

Sets the style to a specified range of cells.

Parameters:

ParameterTypeDescription
firstRowintFirst row of this range(zero based)
firstColumnintFirst column of this range(zero based)
rowNumberintNumber of rows(one based)
columnNumberintNumber of columns(one based)
styleGridTableItemStyleThe style object to be set

setStyle(String cellRange, GridTableItemStyle style)

public void setStyle(String cellRange, GridTableItemStyle style)

Sets the style to a specified range of cells.

Parameters:

ParameterTypeDescription
cellRangejava.lang.StringThe range of cells’ names, like “A1:D6”
styleGridTableItemStyleThe style object to be set

sort(int startRow, int startColumn, int rows, int columns, int index, boolean isAsending, boolean isCaseSensitive, boolean islefttoright)

public void sort(int startRow, int startColumn, int rows, int columns, int index, boolean isAsending, boolean isCaseSensitive, boolean islefttoright)

Sorts the datas ascend/decend top to bottom in a range of a Worksheet by specified column index. Sorts the datas ascend/decend left to right in a range of a Worksheet by specified row index.

Example

         GridWeb GridWeb1 = new GridWeb();
         GridWeb1.getWorkSheets().get(0).getCells().sort(1,0,25,6,3,true,true,false);

Parameters:

ParameterTypeDescription
startRowintThe row number of the first cell to sort.
startColumnintThe column number of the first cell to sort.
rowsintNumber of rows to be imported.
columnsintNumber of columns to be imported.
indexintThe column index that specifis the sort column. if the Orientation is top to bottom ,it stand for the column index that specifis the sort column. if the Orientation is from left to right,it stand for the row index that specifis the sort row.
isAsendingbooleanwhether the sorting order is asending .
isCaseSensitivebooleanwhether the sort is casesensitive .
islefttorightbooleanwhether the sort orientation is from left to right

sort(int startRow, int startColumn, int rows, int columns, int[] indexes, int[] orders, int orientation, boolean isCaseSensitive)

public void sort(int startRow, int startColumn, int rows, int columns, int[] indexes, int[] orders, int orientation, boolean isCaseSensitive)

Sorts the datas ascend/decend top to bottom in a range of a Worksheet by specified column index. Sorts the datas ascend/decend left to right in a range of a Worksheet by specified row index.

Parameters:

ParameterTypeDescription
startRowintThe row number of the first cell to sort.
startColumnintThe column number of the first cell to sort.
rowsintNumber of rows to be imported.
columnsintNumber of columns to be imported.
indexesint[]The column index array that specifis the sort column. if the Orientation is top to bottom ,it stand for the column index that specifis the sort column. if the Orientation is from left to right,it stand for the row index that specifis the sort row.
ordersint[]SortByOrder. the the sorting order array .
orientationintSortOrientation. sorting orientation
isCaseSensitivebooleanwhether the sort is casesensitive .

toString()

public String toString()

Returns: java.lang.String

unMerge(int firstRow, int firstColumn, int totalRows, int totalColumns)

public void unMerge(int firstRow, int firstColumn, int totalRows, int totalColumns)

Unmerges a specified range of merged cells.

Parameters:

ParameterTypeDescription
firstRowintFirst row of this range(zero based)
firstColumnintFirst column of this range(zero based)
totalRowsintNumber of rows(one based)
totalColumnsintNumber of columns(one based)

ungroupColumns(int firstIndex, int lastIndex)

public void ungroupColumns(int firstIndex, int lastIndex)

Ungroups columns.

Parameters:

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

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.

unhideColumn(int column, double width)

public void unhideColumn(int column, double width)

Unhides a column

Parameters:

ParameterTypeDescription
columnintColumn index.
widthdoubleColumn width..Column width must be between 0 and 255

unhideRow(int row)

public void unhideRow(int row)

Unhides a row.

Parameters:

ParameterTypeDescription
rowintRow index.

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