[]
Sheets.ConditionalFormatting.DateOccurringType
日期发生的类型
代码示例
//本示例创建一个规则
var style = new GC.Spread.Sheets.Style();
style.backColor = "red";
var rule = new GC.Spread.Sheets.ConditionalFormatting.NormalConditionRule(GC.Spread.Sheets.ConditionalFormatting.RuleType.dateOccurringRule, [new GC.Spread.Sheets.Range(0,0,10,1)], style, null, null, null, null, null, GC.Spread.Sheets.ConditionalFormatting.DateOccurringType.nextWeek);
activeSheet.conditionalFormats.addRule(rule);
var d = new Date();
activeSheet.setValue(0, 0, d);
activeSheet.setValue(1, 0, new Date(d.setDate(d.getDate()+1)));
activeSheet.setValue(2, 0, new Date(d.setDate(d.getDate()+5)));
activeSheet.setValue(3, 0,new Date(d.setDate(d.getDate()+6)));
activeSheet.setValue(4, 0,new Date(d.setDate(d.getDate()+7)));
activeSheet.setValue(5, 0, new Date(d.setDate(d.getDate()+8)));
• last7Days = 3
最近7天
• lastMonth = 5
上个月
• lastQuarter = 12
上个季度.
• lastWeek = 8
上周
• lastYear = 15
去年
• nextMonth = 6
下个月
• nextQuarter = 10
下个季度
• nextWeek = 9
下周
• nextYear = 13
明年
• thisMonth = 4
本月
• thisQuarter = 11
本季度
• thisWeek = 7
这周
• thisYear = 14
今年
• today = 0
今天
• tomorrow = 2
明天
• yesterday = 1
昨天