使用条件格式
var style1 = new GcSpread.Sheets.Style();
style1.backColor = "green";
sheet.getConditionalFormats().addCellValueRule(GcSpread.Sheets.ComparisonOperator.Between, "=$A$1", "=$B$1", style1, [new GcSpread.Sheets.Range(0,2,1,10)]);
var style2 = new GcSpread.Sheets.Style();
style2.backColor = "red";
sheet.getConditionalFormats().addCellValueRule(GcSpread.Sheets.ComparisonOperator.NotBetween, "=$A$1", "=$B$1", style2, [new GcSpread.Sheets.Range(0,2,1,10)]); |