SpreadJS 13
SpreadJS Documentation / Developer's Guide / Features / Manage Data Visualization and Objects / Conditional Formatting / Specific Text Rule
In This Topic
    Specific Text Rule
    In This Topic

    The specific text rule searches for text strings.

    Specific rule

    Using Code

    This example creates a specific text 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.addSpecificTextRule(GC.Spread.Sheets.ConditionalFormatting.TextComparisonOperators.Contains, "test", style, ranges);
    activeSheet.setValue(0, 0, "testing");
    activeSheet.setValue(1, 0, "test");
    activeSheet.setValue(2, 0, "a");
    activeSheet.setValue(3, 0, "t");
    
    See Also