Exception | Description |
---|---|
System.ArgumentNullException | Occurs when values is null and the rule is currently applied to a Worksheet. |
System.ArgumentException | Occurs when the values array is empty. |
If LimitedValueDataValidationRule.AllowNull is True, null values are allowed in addition to the list of accepted values.
All values will have ToString called on them to covert the accepted values list to a formula.
Note: the formula of accepted values is created by separating each value with a function parameter separator and concatenating them into a single string. So a list of 1, 2, and 3 would have the following formula created: ="1,2,3". However, if the decimal separator of the current culture is a comma (,) then a semicolon (;) will be used to separate the values instead. Because of this, if the ToString of a value returns a string which contains one of these separators, the value will be split into two or more allowed values.
Target Platforms: Android 4.4+, iOS 8+
Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+
ListDataValidationRule Class
ListDataValidationRule Members
GetValuesFormula(String) Method
GetValuesFormula(String,WorkbookFormat,CellReferenceMode,CultureInfo) Method
SetValuesFormula(String,String) Method
SetValuesFormula(String,String,WorkbookFormat,CellReferenceMode,CultureInfo) Method