public class ValidationCollection extends CollectionBase
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");
| Modifier and Type | Method and Description |
|---|---|
int |
add()
Deprecated.
Use ValidationCollection.Add(CellArea) method instead.
|
int |
add(CellArea ca)
Adds a data validation to the collection.
|
Validation |
get(int index)
Gets the
Validation element at the specified index. |
Validation |
getValidationInCell(int row,
int column)
Gets the validation applied to given cell.
|
void |
removeACell(int row,
int column)
Removes all validation setting on the cell.
|
void |
removeArea(CellArea ca)
Removes all validation setting on the range..
|
public int add()
Remarks
NOTE: This method is now obsolete. Instead, please use ValidationCollection.Add(CellArea) method. This method will be removed 12 months later since JANUARY 2015. Aspose apologizes for any inconvenience you may have experienced.Validation object index.public int add(CellArea ca)
ca - The area contains this validation.Validation object index.public Validation get(int index)
Validation element at the specified index.get in class CollectionBaseindex - The zero based index of the element.public void removeACell(int row,
int column)
row - The row index of the cell.column - The column index of the cell.public void removeArea(CellArea ca)
ca - The range which contains the validations setting.public Validation getValidationInCell(int row, int column)
row - The row index.column - The column index.Validation object or null if there is no validation for given cellSee Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.