...
Description |
---|
Excerpt |
---|
Creates a DataValidation object which can be set on a Range, Area, or Cell. |
Signature | ||||
---|---|---|---|---|
| ||||
public DataValidation CreateDataValidation(ValidationType allowedType, System.String formula)
{signature}{signature: |
Signature | ||||||
---|---|---|---|---|---|---|
| }
| |||||
Public Function CreateDataValidation(ByVal allowedType As ValidationType, ByVal formula As String) As DataValidation
{signature}
{parameters}
{param:allowedType}The data type allowed in the cell.{param}
{param:formula}For 'Custom' allowed type: the formula used to validate the cell's data. For 'List' allowed type: the formula referencing a range in the worksheet.{param}
{returns}A [DataValidation|DataValidation] object.{returns}
{example}{code:csharp|title=C#} |
Parameters |
---|
Param | ||||
---|---|---|---|---|
| ||||
The data type allowed in the cell. |
Param | ||||
---|---|---|---|---|
| ||||
For 'Custom' allowed type: the formula used to validate the cell's data. For 'List' allowed type: the formula referencing a range in the worksheet. |
Returns |
---|
A DataValidation object. |
Example | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|