title: Error while opening an excel workbook using C# code
body: <p>I'm trying to open an excel workbook and trying to get a worksheet in it. Excelapp.workbooks.Open line is throwing an Exception as </p>
  
  <blockquote>
    <p>System.Runtime.InteropServices.COMException from HRESULT: 0x800A03EC at Microsoft.Office.Interop.Excel.Workbooks.Open</p>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <pre><code>Excel.Application excelApp = new Excel.ApplicationClass();
  Excel.Workbook excelWorkbook = excelApp.Workbooks.Open(strWBPath, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,Type.Missing, Type.Missing, Type.Missing, true);
  </code></pre>
  
  <p>StrWbPath is my Excel location. I'm refering to 2007 excel and added Microsoft.office.interop.excel of version 12.0.0.0. </p>