SpreadJS 13
GC.Spread.Sheets Namespace / CellRange type / backColor Method
The cell background color.
In This Topic
    backColor Method
    In This Topic
    Gets or sets the background color for the cell, such as "red", "#FFFF00", "rgb(255,0,0)", "Accent 5", and so on.
    Syntax
    var instance = new GC.Spread.Sheets.CellRange(sheet, row, col, rowCount, colCount, sheetArea);
    var returnValue; // Type: any
    returnValue = instance.backColor(value);
    function backColor( 
       (optional) value : string
    ) : any;

    Parameters

    value
    The cell background color.

    Return Value

    If no value is set, returns the cell background color; otherwise, returns the cell.
    Example
    The following examples set the backcolor.
    activeSheet.getRange(2, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).backColor("lightblue");
    activeSheet.getCell(1,1).backColor("lightgreen");
    activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).backColor("pink");
    Remarks
    You can reset the cell backcolor by setting the value to undefined. For example, activeSheet.getCell(1, 1).backColor(undefined);.
    See Also