接口 IValidation


public interface IValidation
Represents data validation for a worksheet range.
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    Adds data validation to the specified range.
    void
    add(ValidationType type, ValidationAlertStyle alertStyle, ValidationOperator validationOperator, Object formula1, Object formula2)
    Adds data validation to the specified range.
    void
    Deletes the object.
    void
    Generates the data validation from the json string.
    Gets the validation alert style.
    Gets the data validation error message.
    Gets the title of the data-validation error dialog box.
    Gets the value or expression associated with the conditional format or data validation.
    Gets the value or expression associated with the second part of a conditional format or data validation.
    boolean
    Gets whether blank values are permitted by the data range validation.
    Gets the description of the Japanese input rules.
    boolean
    Gets whether data validation displays a drop-down list that contains acceptable values.
    Gets the data validation input message.
    Gets the title of the data-validation input dialog box.
    Gets the operator for the conditional format or data validation.
    boolean
    Gets whether the data validation error message will be displayed whenever the user enters invalid data.
    boolean
    Gets whether the data validation input message is displayed whenever the user selects a cell in the data validation range.
    Gets the data type validation for a range.
    boolean
    Gets whether all the validation criteria are met (that is, if the range contains valid data).
    void
    Sets the validation alert style.
    void
    Sets the data validation error message.
    void
    Sets the title of the data-validation error dialog box.
    void
    Sets the value or expression associated with the conditional format or data validation.
    void
    Sets the value or expression associated with the second part of a conditional format or data validation.
    void
    setIgnoreBlank(boolean value)
    Sets whether blank values are permitted by the data range validation.
    void
    Sets the description of the Japanese input rules.
    void
    setInCellDropdown(boolean value)
    Sets whether data validation displays a drop-down list that contains acceptable values.
    void
    Sets the data validation input message.
    void
    Sets the title of the data-validation input dialog box.
    void
    Sets the operator for the conditional format or data validation.
    void
    setShowError(boolean value)
    Sets whether the data validation error message will be displayed whenever the user enters invalid data.
    void
    setShowInputMessage(boolean value)
    Sets whether the data validation input message is displayed whenever the user selects a cell in the data validation range.
    void
    Sets the data type validation for a range.
    Generates a json string from the data validation.
  • 方法详细资料

    • add

      void add(ValidationType type)
      Adds data validation to the specified range.
      参数:
      type - Required ValidationType. The validation type.
    • add

      void add(ValidationType type, ValidationAlertStyle alertStyle, ValidationOperator validationOperator, Object formula1, Object formula2)
      Adds data validation to the specified range.
      参数:
      type - Required ValidationType. The validation type.
      alertStyle - Optional Object. The validation alert style.
      validationOperator - Optional Object. The data validation operator.
      formula1 - Optional Object. The first part of the data validation equation.
      formula2 - Optional Object. The second part of the data validation whenOperator is Between or NotBetween (otherwise, this argument is ignored).
    • delete

      void delete()
      Deletes the object.
    • getAlertStyle

      ValidationAlertStyle getAlertStyle()
      Gets the validation alert style.
    • setAlertStyle

      void setAlertStyle(ValidationAlertStyle value)
      Sets the validation alert style.
    • getErrorMessage

      String getErrorMessage()
      Gets the data validation error message.
    • setErrorMessage

      void setErrorMessage(String value)
      Sets the data validation error message.
    • getErrorTitle

      String getErrorTitle()
      Gets the title of the data-validation error dialog box.
    • setErrorTitle

      void setErrorTitle(String value)
      Sets the title of the data-validation error dialog box.
    • getFormula1

      Object getFormula1()
      Gets the value or expression associated with the conditional format or data validation. Can be a constant value, a string value, a cell reference, or a formula.
    • setFormula1

      void setFormula1(Object value)
      Sets the value or expression associated with the conditional format or data validation. Can be a constant value, a string value, a cell reference, or a formula.
    • getFormula2

      Object getFormula2()
      Gets the value or expression associated with the second part of a conditional format or data validation.
    • setFormula2

      void setFormula2(Object value)
      Sets the value or expression associated with the second part of a conditional format or data validation.
    • getIgnoreBlank

      boolean getIgnoreBlank()
      Gets whether blank values are permitted by the data range validation.
    • setIgnoreBlank

      void setIgnoreBlank(boolean value)
      Sets whether blank values are permitted by the data range validation.
    • getIMEMode

      IMEModeType getIMEMode()
      Gets the description of the Japanese input rules.
    • setIMEMode

      void setIMEMode(IMEModeType value)
      Sets the description of the Japanese input rules.
    • getInCellDropdown

      boolean getInCellDropdown()
      Gets whether data validation displays a drop-down list that contains acceptable values.
    • setInCellDropdown

      void setInCellDropdown(boolean value)
      Sets whether data validation displays a drop-down list that contains acceptable values.
    • getInputMessage

      String getInputMessage()
      Gets the data validation input message.
    • setInputMessage

      void setInputMessage(String value)
      Sets the data validation input message.
    • getInputTitle

      String getInputTitle()
      Gets the title of the data-validation input dialog box.
    • setInputTitle

      void setInputTitle(String value)
      Sets the title of the data-validation input dialog box.
    • getOperator

      ValidationOperator getOperator()
      Gets the operator for the conditional format or data validation.
    • setOperator

      void setOperator(ValidationOperator value)
      Sets the operator for the conditional format or data validation.
    • getShowError

      boolean getShowError()
      Gets whether the data validation error message will be displayed whenever the user enters invalid data.
    • setShowError

      void setShowError(boolean value)
      Sets whether the data validation error message will be displayed whenever the user enters invalid data.
    • getShowInputMessage

      boolean getShowInputMessage()
      Gets whether the data validation input message is displayed whenever the user selects a cell in the data validation range.
    • setShowInputMessage

      void setShowInputMessage(boolean value)
      Sets whether the data validation input message is displayed whenever the user selects a cell in the data validation range.
    • getType

      ValidationType getType()
      Gets the data type validation for a range.
    • setType

      void setType(ValidationType value)
      Sets the data type validation for a range.
    • getValue

      boolean getValue()
      Gets whether all the validation criteria are met (that is, if the range contains valid data).
    • fromJson

      void fromJson(String json)
      Generates the data validation from the json string.
      参数:
      json - the json string
    • toJson

      String toJson()
      Generates a json string from the data validation.
      返回: