Get Cell Validation in ODS Files

Get Cell Validation in ODS Files

With Aspose.Cells, you can get the validation applied to a cell in ODS files. For this, the API provides the get_validation method of the Cell class.

The following code sample demonstrates the use of the get_validation method by loading the source ODS file and reading the validation of the cell A9.

Sample Code

from aspose.cells import Workbook
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
# Load source Excel file
workbook = Workbook("SampleBook1.ods")
# Access first worksheet
worksheet = workbook.worksheets[0]
cell = worksheet.cells.get("A9")
if cell.get_validation() != None:
print(cell.get_validation().type)