Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Wiki Markup
{description}
{excerpt}Creates a [DataValidation] object which can be set on a [Range], [Area], or [Cell].{excerpt}
{signature:C#}
 public DataValidation CreateDataValidation(ValidationType allowedType, System.Object sourceArray)
{signature}{signature:vb.net}
Public Function CreateDataValidation(ByVal allowedType As ValidationType, ByVal sourceArray As Object) As DataValidation
{signature}
{parameters}
{param:allowedType}The data type allowed in the cell.{param}
{param:sourceArray}For 'List' allowed type: the array of valid values for the cell.{param}
{returns}A [DataValidation|DataValidation] object.{returns}
{example}{code:csharp|title=C#}

          DataValidation dataValidation =
               wb.createDataValidation(
               DataValidation.ValidationType.List,
               listArray);
        {code}
{code:vb.net|title=vb.net}

          Dim dataValidation As DataValidation = _
               wb.createDataValidation( _
               DataValidation.ValidationType.List, _
               listArray)
        {code}

{example}