[]
        
(Showing Draft Content)

IConditionValue

Interface IConditionValue


public interface IConditionValue
Represents how the shortest bar or longest bar is evaluated for a data bar conditional formatting rule.

An IConditionValue object defines the threshold type and threshold value used by a conditional formatting rule. It is typically used with data bars to describe how the minimum or maximum point is determined.


 worksheet.getRange("A1:A3").setValue(new Object[][] {{10}, {40}, {90}});
 IDataBar dataBar = worksheet.getRange("A1:A3").getFormatConditions().addDatabar();
 IConditionValue minPoint = dataBar.getMinPoint();
 minPoint.setType(ConditionValueTypes.Number);
 minPoint.setValue(10);
 
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns one of the constants of the ConditionValueTypes enumeration, which specifies how the threshold values for a data bar, color scale, or icon set conditional format are determined.
    Returns the shortest bar or longest bar threshold value for a data bar conditional format.
    void
    Sets one of the constants of the ConditionValueTypes enumeration, which specifies how the threshold values for a data bar, color scale, or icon set conditional format are determined.
    void
    Sets the shortest bar or longest bar threshold value for a data bar conditional format.
  • Method Details

    • getType

      Returns one of the constants of the ConditionValueTypes enumeration, which specifies how the threshold values for a data bar, color scale, or icon set conditional format are determined.

      Use this method to inspect whether the threshold is based on a number, percentage, percentile, formula, or an automatic minimum or maximum value.

      
       worksheet.getRange("A1:A3").setValue(new Object[][] {{10}, {40}, {90}});
       IDataBar dataBar = worksheet.getRange("A1:A3").getFormatConditions().addDatabar();
       IConditionValue minPoint = dataBar.getMinPoint();
       minPoint.setType(ConditionValueTypes.Number);
       ConditionValueTypes type = minPoint.getType();
       
      Returns:
      One of the constants of the ConditionValueTypes enumeration that specifies how the threshold value is determined.
    • setType

      void setType(ConditionValueTypes value)
      Sets one of the constants of the ConditionValueTypes enumeration, which specifies how the threshold values for a data bar, color scale, or icon set conditional format are determined.

      Use this method to control how the condition value interprets its threshold value, such as a fixed number, percentage, percentile, formula, or automatic minimum or maximum.

      
       worksheet.getRange("A1:A3").setValue(new Object[][] {{10}, {20}, {30}});
       IDataBar dataBar = worksheet.getRange("A1:A3").getFormatConditions().addDatabar();
       IConditionValue maxPoint = dataBar.getMaxPoint();
       maxPoint.setType(ConditionValueTypes.Percent);
       maxPoint.setValue(80);
       
      Parameters:
      value - The ConditionValueTypes constant that specifies how the threshold value is determined. Must not be null.
    • getValue

      Object getValue()
      Returns the shortest bar or longest bar threshold value for a data bar conditional format.
      
       worksheet.getRange("A1:A3").setValue(new Object[][] {{10}, {40}, {90}});
       IDataBar dataBar = worksheet.getRange("A1:A3").getFormatConditions().addDatabar();
       IConditionValue minPoint = dataBar.getMinPoint();
       minPoint.setType(ConditionValueTypes.Number);
       minPoint.setValue(10);
       Object value = minPoint.getValue();
       
      Returns:
      The shortest bar or longest bar threshold value for a data bar conditional format.
    • setValue

      void setValue(Object value)
      Sets the shortest bar or longest bar threshold value for a data bar conditional format.
      
       worksheet.getRange("A1:A3").setValue(new Object[][] {{10}, {40}, {90}});
       IDataBar dataBar = worksheet.getRange("A1:A3").getFormatConditions().addDatabar();
       IConditionValue minPoint = dataBar.getMinPoint();
       minPoint.setType(ConditionValueTypes.Number);
       minPoint.setValue(10);
       
      Parameters:
      value - The shortest bar or longest bar threshold value for a data bar conditional format.