[]
Represents data validation for a worksheet range.
public interface IValidation
Gets or sets the validation alert style.
ValidationAlertStyle AlertStyle { get; set; }
Gets or sets the data validation error message (read or write).
string ErrorMessage { get; set; }
Gets or sets the title of the data-validation error dialog box (read or write).
string ErrorTitle { get; set; }
Gets or 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 (read-only string).
object Formula1 { get; set; }
Gets or sets the value or expression associated with the second part of a conditional format or data validation (read-only string).
object Formula2 { get; set; }
Gets or sets whether blank values are permitted by the data range validation (read or write).
bool IgnoreBlank { get; set; }
Gets or sets the description of the Japanese input rules.
IMEModeType IMEMode { get; set; }
Gets or sets whether data validation displays a drop-down list that contains acceptable values.
bool InCellDropdown { get; set; }
Gets or sets the data validation input message (read or write string).
string InputMessage { get; set; }
Gets or sets the title of the data-validation input dialog box (read or write string).
string InputTitle { get; set; }
Gets or sets the operator for the conditional format or data validation (read-only).
ValidationOperator Operator { get; set; }
Gets or sets whether the data validation error message will be displayed whenever the user enters invalid data (read or write).
bool ShowError { get; set; }
Gets or sets whether the data validation input message is displayed whenever the user selects a cell in the data validation range (read or write).
bool ShowInputMessage { get; set; }
Gets or sets the data type validation for a range (read-only).
ValidationType Type { get; set; }
Gets whether all the validation criteria are met (that is, if the range contains valid data). This property is read-only.
bool Value { get; }
Adds data validation to the specified range.
void Add(ValidationType type, ValidationAlertStyle alertStyle = ValidationAlertStyle.Stop, ValidationOperator validationOperator = ValidationOperator.Between, object formula1 = null, object formula2 = null)
type
ValidationTypeRequired ValidationType. The validation type.
alertStyle
ValidationAlertStyleOptional Object. The validation alert style.
validationOperator
ValidationOperatorOptional Object. The data validation operator.
formula1
objectOptional Object. The first part of the data validation equation.
formula2
objectOptional Object. The second part of the data validation when Operator is Between or NotBetween (otherwise, this argument is ignored).
Deletes the object.
void Delete()
Generates the data validation from the JSON string.
void FromJson(string json)
json
stringthe JSON string
Generates a JSON string from the data validation.
string ToJson()
The JSON string representing the data validation.