SpreadJS 14
GC.Spread.Sheets Namespace / Worksheet type / setStyle Method
The row index.
The column index.
The cell style.
The sheet area. If this parameter is not provided, it defaults to viewport.
In This Topic
    setStyle Method
    In This Topic
    Sets the style information for a specified cell in the specified sheet area.
    Syntax
    var instance = new GC.Spread.Sheets.Worksheet(name);
    var returnValue; // Type: any
    returnValue = instance.setStyle(row, column, value, sheetArea);
    function setStyle( 
       row : number,
       column : number,
       value : Style,
       (optional) 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 GC.Spread.Sheets.Style();
    style.backColor = "lightgreen";
    style.backgroundImage = "./css/images/quarter1.png";
    activeSheet.setStyle(1,1,style,GC.Spread.Sheets.SheetArea.viewport);
    See Also

    Reference

    Worksheet type