Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The top 10 rule checks for values in the top or bottom of the range.Top 10 规则用于检查单元格中的值是否较大或者较小。

Using Code
This example creates a top 10 rule.示例代码
以下代码使用了 Top 10 规则。

JavaScript

Copy Code

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="3af2a154-daf6-4291-86a3-20764a91345a"><ac:plain-text-body><![CDATA[

var style = new GC.Spread.Sheets.Style();style.backColor = "red";var ranges=[new GC.Spread.Sheets.Range(0,0,10,1)];activeSheet.conditionalFormats.addTop10Rule(GC.Spread.Sheets.ConditionalFormatting.Top10ConditionType.Top, 2, style, ranges);activeSheet.setValue(0, 0, 1);activeSheet.setValue(1, 0, 50);activeSheet.setValue(2, 0, 11);activeSheet.setValue(3, 0, 5);

 

]]></ac:plain-text-body></ac:structured-macro>

See Also
addTop10Rule Method
Top10ConditionType Enumeration
addRule Method
NormalConditionRule class