SpreadJS Documentation
setStyle Method
The row index.
The column index.
The cell style.
The sheet area. If this parameter is not provided, it defaults to viewport.
Sets the style information for a specified cell in the specified sheet area.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var returnValue; // Type: any
returnValue = instance.setStyle(row, column, value, sheetArea);
function setStyle( 
   row : number,
   column : number,
   value : Style,
   sheetArea : SheetArea
) : any;

Parameters

row
The row index.
column
The column index.
value
The cell style.
sheetArea
The sheet area. If this parameter is not provided, it defaults to viewport.
Example
This example uses the setStyle method.
var style = new GcSpread.Sheets.Style();
style.backColor = "lightgreen";
style.backgroundImage = "./css/images/quarter1.png";
activeSheet.setStyle(1,1,style,GcSpread.Sheets.SheetArea.viewport);
See Also

Reference

Sheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.