title: Reading data from excel in selenium C#
body: <p>I'm trying to read username and password from excel sheet while using Selenium in C# .NET. Below is the code:</p>
  
  <pre><code>using excel = Microsoft.Office.Interop.Excel;
  
  public void TestMethod1()
  {
         excel.Application xlApp = new excel.Application();
         excel.Workbook xlWorkbook = xlApp.Workbooks.Open(@"D:\Test\TestData.xlsx");
         excel._Worksheet xlWorksheet = **xlWorkbook.Sheets[1];**
         excel.Range xlRange = xlWorksheet.UsedRange;
   }
  </code></pre>
  
  <p>I'm getting the following error at the text that is marked in bold in above code:</p>
  
  <blockquote>
    <p>Error CS0656  Missing compiler required member
    'Microsoft.CSharp.RuntimeBinder.Binder.Convert'   Read Data From
    Excel_Office  c:\users\tabish.khan\documents\visual studio
    2015\Projects\Read Data From Excel_Office\Read Data From
    Excel_Office\OfficeReadExcel.cs   18  Active</p>
  </blockquote>
  
  <p>Please help me resolve this issue.</p>