SpreadJS Documentation
setFormatter Method
The row index.
The column index.
The formatter string or object.
The sheet area. If this parameter is not provided, it defaults to viewport.
Sets the cell formatter.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var returnValue; // Type: any
returnValue = instance.setFormatter(row, col, value, sheetArea);
function setFormatter( 
   row : number,
   col : number,
   value : Object,
   sheetArea : SheetArea
) : any;

Parameters

row
The row index.
col
The column index.
value
The formatter string or object.
sheetArea
The sheet area. If this parameter is not provided, it defaults to viewport.
Example
This example sets the format object for the active sheet.
activeSheet.setValue(2, 3, new Date(2011, 2, 9));
activeSheet.setFormatter(2,3,"M",GcSpread.Sheets.SheetArea.viewport);
See Also

Reference

Sheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.