JavaScript is disabled on your browser.
java.lang.Object
CollectionBase
com.aspose.cells.ValidationCollection
All Implemented Interfaces: java.lang.Iterable
public class ValidationCollection extends CollectionBase
Represents data validation collection.
Example:
Workbook workbook = new Workbook();
ValidationCollection validations = workbook.getWorksheets().get(0).getValidations();
CellArea area = CellArea.createCellArea(0, 0, 1, 1);
Validation validation = validations.get(validations.add(area));
validation.setType(com.aspose.cells.ValidationType.LIST);
validation.setFormula1("a,b,c,d");
Property Getters/Setters Summary
int
getCount ()
→ inherited from com.aspose.cells.CollectionBase
Validation
get (int)
Gets the Validation element at the specified index.
Method Summary
int
add ()
Adds a data validation to the collection.
int
add (CellArea ca)
Adds a data validation to the collection.
int
add (java.lang.Object value)
→ inherited from com.aspose.cells.CollectionBase
Reserved for internal use.
void
clear ()
→ inherited from com.aspose.cells.CollectionBase
boolean
contains (java.lang.Object value)
→ inherited from com.aspose.cells.CollectionBase
Reserved for internal use.
Validation
getValidationInCell (int row, int column)
Gets the validation applied to given cell.
int
indexOf (java.lang.Object value)
→ inherited from com.aspose.cells.CollectionBase
Reserved for internal use.
java.util.Iterator
iterator ()
→ inherited from com.aspose.cells.CollectionBase
void
removeACell (int row, int column)
Removes all validation setting on the cell.
void
removeArea (CellArea ca)
Removes all validation setting on the range..
void
removeAt (int index)
→ inherited from com.aspose.cells.CollectionBase
Property Getters/Setters Detail
getCount → inherited from com.aspose.cells.CollectionBase
public int getCount ()
Gets the Validation element at the specified index.
Parameters: index
- The zero based index of the element.Returns: The element at the specified index.
Adds a data validation to the collection.
NOTE: This member is now obsolete. Instead,
please use ValidationCollection.Add(CellArea) method.
This property will be removed 12 months later since JANUARY 2015.
Aspose apologizes for any inconvenience you may have experienced. Returns: Validation object index.
Adds a data validation to the collection.
Parameters: ca
- The area contains this validation.Returns: Validation object index.
removeACell
public void removeACell (int row, int column)
Removes all validation setting on the cell.
Parameters: row
- The row index of the cell.column
- The column index of the cell.
removeArea
public void removeArea (CellArea ca)
Removes all validation setting on the range..
Parameters: ca
- The range which contains the validations setting.
getValidationInCell
public Validation getValidationInCell (int row, int column)
Gets the validation applied to given cell.
Parameters: row
- The row index.column
- The column index.Returns: Returns a Validation object or null if there is no validation for given cell
clear → inherited from com.aspose.cells.CollectionBase
public void clear ()
removeAt → inherited from com.aspose.cells.CollectionBase
public void removeAt (int index)
iterator → inherited from com.aspose.cells.CollectionBase
public java.util.Iterator iterator ()
contains → inherited from com.aspose.cells.CollectionBase
public boolean contains (java.lang.Object value)
Reserved for internal use.
add → inherited from com.aspose.cells.CollectionBase
public int add (java.lang.Object value)
Reserved for internal use.
indexOf → inherited from com.aspose.cells.CollectionBase
public int indexOf (java.lang.Object value)
Reserved for internal use.
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.