Aspose::Cells::ValidationCollection class
Contents
[
Hide
]ValidationCollection class
Represents data validation collection.
class ValidationCollection
Methods
| Method | Description |
|---|---|
| Add(const CellArea& ca) | Adds a data validation to the collection. |
| Get(int32_t index) | Gets the Validation element at the specified index. |
| GetCount() | |
| GetValidationInCell(int32_t row, int32_t column) | Gets the validation applied to given cell. |
| IsNull() const | Checks whether the implementation object is nullptr. |
| explicit operator bool() const | operator bool() |
| operator=(const ValidationCollection& src) | operator= |
| RemoveACell(int32_t row, int32_t column) | Removes all validation setting on the cell. |
| RemoveArea(const CellArea& ca) | Removes all validation setting on the range.. |
| ValidationCollection(ValidationCollection_Impl* impl) | Constructs from an implementation object. |
| ValidationCollection(const ValidationCollection& src) | Copy constructor. |
| ~ValidationCollection() | Destructor. |
Fields
| Field | Description |
|---|---|
| _impl | The implementation object. |
Examples
Aspose::Cells::Startup();
Workbook 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(ValidationType::List);
validation.SetFormula1(u"a,b,c,d");
Aspose::Cells::Cleanup();
See Also
- Namespace Aspose::Cells
- Library Aspose.Cells for C++