{description}
{excerpt}Creates a [DataValidation] object which can be set on a [Range], [Area], or [Cell].{excerpt}
{signature:C#}
 public DataValidation CreateDataValidation(ValidationType allowedType, ComparisonType comparison, System.Object value)
{signature}{signature:vb.net}
Public Function CreateDataValidation(ByVal allowedType As ValidationType, ByVal comparison As ComparisonType, ByVal value As Object) As DataValidation
{signature}
{parameters}
{param:allowedType}The data type allowed in the cell.{param}
{param:comparison}The comparison used to validate the cell's value.{param}
{param:value}A primitive or Date representing the constraint value for the data validation.{param}
{returns}A [DataValidation|DataValidation] object.{returns}
{example}{code:csharp|title=C#}

          DataValidation dataValidation =
               wb.createDataValidation(
               DataValidation.ValidationType.WholeNumber,
               DataValidation.ComparisonType.LessThan, 1);
        {code}
{code:vb.net|title=vb.net}

          Dim dataValidation As DataValidation = _
               wb.createDataValidation( _
               DataValidation.ValidationType.WholeNumber, _
               DataValidation.ComparisonType.LessThan, 1)
        {code}

{example}