activeSheet.setValue(0,0,1,3);
activeSheet.setValue(1,0,15,3);
activeSheet.setValue(2,0,25,3);
activeSheet.setValue(3,0,-1,3);
var base = GcSpread.Sheets.IconSetRule.getIcon;
GcSpread.Sheets.IconSetRule.getIcon = function (iconSetType, iconIndex) {
var icon = base.apply(this, arguments);
if (iconSetType === GcSpread.Sheets.IconSetType.ThreeArrowsColored) {
if (iconIndex === 0) {
return "images/Star2.png";
} else if (iconIndex === 1){
return "images/Rating4.png";
} else if (iconIndex === 2) {
return "images/Box4.png";
}
}
return icon;
};
var cfs = activeSheet.getConditionalFormats();
var iconSetRule = new GcSpread.Sheets.IconSetRule();
iconSetRule.ranges =[new GcSpread.Sheets.Range(0,0,4,1)];
iconSetRule.iconSetType(GcSpread.Sheets.IconSetType.ThreeArrowsColored);
var iconCriteria = iconSetRule.iconCriteria();
iconCriteria[0] = new GcSpread.Sheets.IconCriterion(true, GcSpread.Sheets.IconValueType.Number, 1);
iconCriteria[1] = new GcSpread.Sheets.IconCriterion(true, GcSpread.Sheets.IconValueType.Number, 10);
iconCriteria[2] = new GcSpread.Sheets.IconCriterion(true, GcSpread.Sheets.IconValueType.Number, 20);
iconSetRule.reverseIconOrder(false);
iconSetRule.showIconOnly(false);
cfs.addRule(iconSetRule);