Spread.Sheets Documentation
addCellValueRule Method
The comparison operator.
The first value.
The second value.
The style that is applied to the cell when the condition is met.
The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.
Adds the cell value rule to the rule collection.
Syntax
var instance = new GC.Spread.Sheets.ConditionalFormatting.ConditionalFormats(worksheet);
var value; // Type: object
value = instance.addCellValueRule(comparisionOperator, value1, value2, style, ranges);
function addCellValueRule( 
   comparisionOperator : ComparisonOperators,
   value1 : object,
   value2 : object,
   style : Style,
   ranges : undefined
) : object;

Parameters

comparisionOperator
The comparison operator.
value1
The first value.
value2
The second value.
style
The style that is applied to the cell when the condition is met.
ranges
The cell ranges where the rule is applied whose item type is GC.Spread.Sheets.Range.

Return Value

The cell value rule added to the rule collection.
Example
This example uses the addCellValueRule method.
var style = new GC.Spread.Sheets.Style();
style.backColor = "red";
var ranges=[new GC.Spread.Sheets.Range(0,0,5,1)];
activeSheet.conditionalFormats.addCellValueRule(GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between, 2, 100, style, ranges);
activeSheet.setValue(0,0,1,3);
activeSheet.setValue(1,0,45,3); 
See Also

Reference

ConditionalFormats type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.