SpreadJS Documentation
getCellType Method
The row index.
The column index.
The sheet area. If this parameter is not provided, it defaults to viewport.
Gets the cell type.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var value; // Type: BaseCellType
value = instance.getCellType(row, col, sheetArea);
function getCellType( 
   row : number,
   col : number,
   sheetArea : SheetArea
) : BaseCellType;

Parameters

row
The row index.
col
The column index.
sheetArea
The sheet area. If this parameter is not provided, it defaults to viewport.

Return Value

Returns the cell type for the specified cell.
Example
This example gets the cell type.
var cellType = new GcSpread.Sheets.ButtonCellType();
cellType.buttonBackColor("#FFFF00");
cellType.text("this is a button");
activeSheet.getCell(0, 2).cellType(cellType);

var cellType = activeSheet.getCellType(0,2,GcSpread.Sheets.SheetArea.viewport)
if (cellType instanceof GcSpread.Sheets.ButtonCellType) {
      alert("This is a ButtonCellType");
}
See Also

Reference

Sheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.