SpreadJS Documentation
getConditionalFormats Method
Gets the conditional format for the sheet.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var value; // Type: ConditionalFormats
value = instance.getConditionalFormats();
function getConditionalFormats() : ConditionalFormats;

Return Value

The conditional format for the sheet.
Example
This example sets the conditional format.
sheet.setValue(0, 0, 1);
sheet.setValue(1, 0, 50);
sheet.setValue(2, 0, 100);
sheet.setValue(3, 0, 2);
sheet.setValue(4, 0, 60);
sheet.setValue(5, 0, 90);
sheet.setValue(6, 0, 3);
sheet.setValue(7, 0, 40);
sheet.setValue(8, 0, 70);
sheet.setValue(9, 0, 5);
sheet.setValue(10, 0, 35);
sheet.addSelection(0, 0, 11, 1);
var ScaleValueType = GcSpread.Sheets.ScaleValueType;
sheet.getConditionalFormats().add3ScaleRule(ScaleValueType.LowestValue, 10, "red", ScaleValueType.Number, 50, "blue",ScaleValueType.HighestValue, 100, "yellow", sheet.getSelections());
Remarks

See Also

Reference

Sheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.