SpreadJS 13
GC.Spread.Sheets Namespace / CellRange type / cellType Method
The cell type.
In This Topic
    cellType Method
    In This Topic
    Gets or sets the cell type of the cell.
    Syntax
    var instance = new GC.Spread.Sheets.CellRange(sheet, row, col, rowCount, colCount, sheetArea);
    var returnValue; // Type: any
    returnValue = instance.cellType(value);
    function cellType( 
       (optional) value : Base
    ) : any;

    Parameters

    value
    The cell type.

    Return Value

    If no value is set, returns the cell type; otherwise, returns the cell.
    Example
    The following examples create check box cells.
    activeSheet.getRange(1, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).cellType(new GC.Spread.Sheets.CellTypes.CheckBox());
    
    activeSheet.getCell(1, 1).cellType(new GC.Spread.Sheets.CellTypes.CheckBox());
    activeSheet.getRange(-1, 1, -1, 1, GC.Spread.Sheets.SheetArea.viewport).cellType(new GC.Spread.Sheets.CellTypes.CheckBox());
    See Also