Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Description

Excerpt

Creates a DataValidation object which can be set on a Range, Area, or Cell.

Signature
C#C#
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, ComparisonType comparison, System.Object minimumValue, System.Object maximumValue)
Signature
{signature}{signature:vb.net
vb.net
}
Public Function CreateDataValidation(ByVal allowedType As ValidationType, ByVal comparison As ComparisonType, ByVal minimumValue As Object, ByVal maximumValue As Object) As DataValidation
Parameters

...

The data type allowed in the cell.

...

The comparison used to validate the cell's value.

...

A primitive or Date representing cell's maximum value.

...

A primitive or Date representing the cell's minimum value.

Returns

A DataValidation object.

{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:minimumValue}A primitive or Date representing cell's maximum value.{param}
{param:maximumValue}A primitive or Date representing the cell's minimum value.{param}
{returns}A [DataValidation|DataValidation] object.{returns}
{example}{code:csharp|title=C#}

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

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

{example}
Example
Code Block
csharpcsharp
titleC#
Code Block
vb.nettitle