Exception | Description |
---|---|
System.ArgumentException | Occurs when value cannot be represented as a date in Excel. |
The way in which the cell value is compared to the constraint value is determined by the ValidationOperator as well as the ValueConstraintDataValidationRule.ValidationCriteria.
Depending on the ValidationCriteria of the rule, either the cell value itself or the length of the cell value's text equivalent is compared to the constraint value.
This overload is preferred when the ValidationCriteria is Date. When the ValidationCriteria is WholeNumber, Decimal, or TextLength, the SetConstraint(Double) overload is preferred, and when the ValidationCriteria is Time, the SetConstraint(TimeSpan) overload is preferred.
Target Platforms: Android 4.4+, iOS 8+
Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+
OneConstraintDataValidationRule Class
OneConstraintDataValidationRule Members
Overload List
SetConstraint(Double) Method
SetConstraint(TimeSpan) Method
TryGetConstraint(DateTime) Method
SetConstraintFormula(String,String) Method
SetConstraintFormula(String,String,WorkbookFormat,CellReferenceMode,CultureInfo) Method
ValidationOperator Property
ValidationCriteria Property