We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Validation.AreaList.Add throwing error for new aspose cells


We are using Aspose Cells new version and we are getting issues with Validation properties.It’s throwing error which says ‘Property AreaList is obsolete: Use Validation.Areas property instead’.Mentioned below is the code with i have written.

Dim _sheet As Worksheet
Dim validations As ValidationCollection = _sheet.Validations
Dim validation As Validation = validations(validations.Add(cellArea))

What is the new property to be used for creating Cell area for validation?


Thanks for your query and sample code segment.

Well, you do not need the following line of code any more now:

as you already created data validation based on “cellArea”:
Dim validation As Validation = validations(validations.Add(cellArea))

All you need to do is create the CellArea to be specified when adding data validation.

Thank you.