[]
        
首页
开发者学堂
文档
论坛
市场
生态机会
活动
立即试用
(Showing Draft Content)

FormatConditionOperator

Enum Class FormatConditionOperator

java.lang.Object
java.lang.Enum<FormatConditionOperator>
com.grapecity.documents.excel.FormatConditionOperator
All Implemented Interfaces:
Serializable, Comparable<FormatConditionOperator>, Constable

public enum FormatConditionOperator extends Enum<FormatConditionOperator>
指定条件格式规则用于将公式与单元格值比较的运算符;对于 Between 和 NotBetween,则用于比较两个公式。

将此枚举与单元格值条件格式规则一起使用,以定义条件的计算方式。Between 和 NotBetween 需要两个公式参数,而其他运算符使用单个比较值。


 worksheet.getRange("A1:A5").setValue(new Object[][] {
     {80}, {95}, {110}, {140}, {180}
 });
 IFormatCondition condition = (IFormatCondition) worksheet.getRange("A1:A5")
     .getFormatConditions()
     .add(FormatConditionType.CellValue, FormatConditionOperator.Between, 100, 150);
 condition.setNumberFormat("0");
 
  • Enum Constant Details

  • Method Details

    • values

      public static FormatConditionOperator[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FormatConditionOperator valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null