Click or drag to resize
DataValidationFormula1 Property
Gets or sets the first formula in the DataValidation dropdown.

Namespace: GemBox.Spreadsheet
Assembly: GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 39.3.30.1189
Syntax
public Object Formula1 { get; set; }

Property Value

Type: Object
The first formula in the DataValidation dropdown.
Remarks
It used as a bounds for Between and NotBetween relational operators, and the only formula used for other relational operators (Equal, NotEqual, LessThan, LessThanOrEqual, GreaterThan, GreaterThanOrEqual), or for Custom or List data validation type. The content can be an instance of any type, but the following rules apply when formula is being written:
If data validation type is WholeNumber or TextLength, and content is integral data type (SByte, Byte, Int16, UInt16, Int32, UInt32, Int64, UInt64), formula will be saved as integral constant, else if formula is an Excel formula or an Excel reference (String that starts with '='), value will be saved as a formula, otherwise, it will be saved as string constant.
If data validation type is Decimal, and content is floating-point data type (Single, Double, Decimal), formula will be saved as floating-point constant, else if formula is an Excel formula or an Excel reference (String that starts with '='), value will be saved as a formula, otherwise, it will be saved as string constant.
If data validation type is Date, and content is DateTime data type, formula will be saved as date constant, else if formula is an Excel formula or an Excel reference (String that starts with '='), value will be saved as a formula, otherwise, it will be saved as string constant.
If data validation type is Time, and content is TimeSpan data type, formula will be saved as time constant, else if formula is an Excel formula or an Excel reference (String that starts with '='), value will be saved as a formula, otherwise, it will be saved as string constant.
If data validation type is List, and content is any type that implements IEnumerable, formula will be saved as list series (comma seperated values), else if formula is an Excel formula or an Excel reference (String that starts with '='), value will be saved as a formula, otherwise, it will be saved as string constant.
If data validation type is Custom, and formula is an Excel formula or an Excel reference (String that starts with '='), value will be saved as a formula, otherwise, it will be saved as string constant.
If data validation type is None, formula won't be saved.
See Also