SpreadJS 14
Features / Conditional Formatting / Top 10 Rule
In This Topic
    Top 10 Rule
    In This Topic

    The top 10 rule checks for values in the top or bottom of the range.

    Top 10 rule

    Using Code

    This example creates a top 10 rule.

    JavaScript
    Copy Code
    var style = new GC.Spread.Sheets.Style();
    style.backColor = "red";
    var ranges=[new GC.Spread.Sheets.Range(0,0,10,1)];
    activeSheet.conditionalFormats.addTop10Rule(GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType.Top, 2, style, ranges);
    activeSheet.setValue(0, 0, 1);
    activeSheet.setValue(1, 0, 50);
    activeSheet.setValue(2, 0, 11);
    activeSheet.setValue(3, 0, 5);
    
    See Also