so I have asked how to change the value in a cell inside of excel using c#, but what if I want to change the value of a drop down list. The code I am using for sheet modifying i
Use this to navigate through the drop down list.If you are using drop down object. We are using shapes.item
You need to identify the shape object name from your excel.
var control = xlWorksheet.Shapes.Item("Drop Down 22").ControlFormat;
control.ListIndex = 5; \\This allows you to change the drop down to 5th element
In case you are trying to change a combo box which is based on the cell of a excel sheet , you can directly change the cell value
Excel.Range xlRangeloc= xlWorksheetH.get_Range("D5");
xlRangeloc.Value = "OptionOne";