I am actually trying to create a dependent drop down in excel using C#. Example: If we have two drop down columns named 'Country' and 'State' in excel. Based on the 'Country' chosen 'State' column drop down values will be populated.
In excel I have done this using data validation.
I can apply it in excel using C# as well except this INDIRECT(J2) as follows:
xlWorkSheet.Range["K2:K10"].Validation.Add(Excel.XlDVType.xlValidateList, Type.Missing, Excel.XlFormatConditionOperator.xlBetween, Countries);
In the above code Countries is a string separated by comma. It is actually working fine. But how to write a code for INDIRECT(J2) to be replicated in the Source box of Data Validation as follows:
Any help would be appreciated.