In my application I have a requirement to create an excel file contains several combos.I have created upto that.
Now I have to read those combo's value from excel. I have found a link to read from excel Read From Excel
But In my code I have found this..
Here is my code
Microsoft.Office.Interop.Excel.Application oXL = new Microsoft.Office.Interop.Excel.Application();
Microsoft.Office.Interop.Excel._Workbook oWB;
Microsoft.Office.Interop.Excel._Worksheet oSheet;
Microsoft.Office.Interop.Excel.Range oRng;
//Get a new workbook.
oWB = (Microsoft.Office.Interop.Excel._Workbook)(oXL.Workbooks.Open("C:\\TopicUpload_2017October14.xls"));
//3rd Sheet
oSheet = (Microsoft.Office.Interop.Excel._Worksheet) oWB.Sheets.get_Item(1);
Microsoft.Office.Interop.Excel.DropDowns allDropDowns = oSheet.DropDowns(Type.Missing);
Microsoft.Office.Interop.Excel.DropDown oneDropdown = allDropDowns.Item("2");
Now how can I get selected text of this dropdown.. When I inspect I got
oneDropdown.ListCount = 5.0; // items count of second drop down, which is true
But could not able to get selected text.
oneDropdown.Text