How to execute data validation on one cell?

Hello. Please see below for the example which describes my issue:

1. pick a value in option A
2. it will populate the items in option B

Question: I want to have the ability to load the workbook using asp.net Cells and insert a valid value for option A, run the data validation, and get the corresponding items in option B

Please let me know whether this can be done.


Thanks.

Hi,

Please see the document for your complete reference. Kindly see the Data Validation sub-topics in the document especially “List” Data Validation for your needs.
Data Filtering
Data Validation

Thank you.

Hi,


I understand that you can add a data validation to a cell, but does aspose.cells actually execute that validation and returns the corresponding option B items?

This is the scenario in my mind:

C#:
***
Range rangeA = workbook.worksheets.getRangeByName(“OptionA”);
rangeA[0,0].putValue(1);
workbook.CalculateFormula();
***

if I try to get: rangeB[0,0].Value, I will get "a1"

with the current Aspose.Cells, I will get an empty string.

Hi,

I am not sure what you demand. But, one thing should be noticed, Aspose.Cells only sets data validation or applies data validation on cells in the Excel workbooks. To evaluate or execute data validation, you need to open the file into MS Excel. Also, list validation should not be taken as DropDown List / ComboBox control. List Validation puts some restriction while inserting/manipulating data in the cells. Also, the Data Validation only prevents entering invalid data only.


Thank you.