[]
Specifies the type of data validation test to apply to cell values.
Use this enum with data validation APIs to control which kinds of values are accepted in a cell or range. Supported validation types include no restriction, whole numbers, decimal numbers, lists, dates, times, text length, and custom formulas.
public enum ValidationType
Public Enum ValidationType
worksheet.Range["D2:E5"].Validation.Add(
ValidationType.Whole,
ValidationAlertStyle.Stop,
ValidationOperator.Between,
3,
8);
| Name | Description |
|---|---|
| Custom | Specifies that the data validation uses a custom formula to check the cell value. |
| Date | Specifies that the data validation checks for and allows date values that meet the given condition. |
| Decimal | Specifies that the data validation checks for and allows decimal values that meet the given condition. |
| List | Specifies that the data validation checks for and allows a value that matches one in a list of values. |
| None | Specifies that the data validation allows any type of value and does not check for a type or range of values. |
| TextLength | Specifies that the data validation checks for and allows text values whose length meets the given condition. |
| Time | Specifies that the data validation checks for and allows time values that meet the given condition. |
| Whole | Specifies that the data validation checks for and allows whole number values that meet the given condition. |