title: How can I populate a comboBox using the fields in an excel column? C#
body: <p>I have data in column B of my excel sheet that I would like to use to populate a combobox, each cell in the row being a value in the comboBox dropdown list.</p>
  
  <pre><code>        Excel.Application xlApp = new Excel.Application();
          Excel.Workbook xlWorkbook = xlApp.Workbooks.Open("X:\\Private\\Users\\Temp\\testexcel.xlsm");
          Excel._Worksheet xlWorksheet = xlWorkbook.Sheets[1];
          Excel.Range xlRange = xlWorksheet.Range["B1:B40"];
  
  
  
          foreach (var d in xlRange)
          {
  
             comboBox1.Items.Add(d);
  
  
          }
  </code></pre>
  
  <p>My code doesn't seem to work, I am having trouble with where I should be casting to a string so that it doesn't return as a system.COMobject and instead returns with all the strings in the excel cells as the values in the comboBox. Should I use an array or a list or neither? Am I getting the column range correctly?</p>