title: Unable to load excel file using Microsoft.Office > interop.Excel
body: <p>In my WPF application I am using Microsoft.Office.Interop.Excel to import data from excel file. I have been using this code for last couple of months and it has been working just fine for me. Today all of a sudden when I ran the utility I got the following error.</p>
  
  <blockquote>
    <p>Unable to cast COM object of type
    'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type
    'Microsoft.Office.Interop.Excel._Application'. This operation failed
    because the QueryInterface call on the COM component for the interface
    with IID '{000208D5-0000-0000-C000-000000000046}' failed due to the
    following error: Library not registered. (Exception from HRESULT:
    0x8002801D (TYPE_E_LIBNOTREGISTERED)).</p>
  </blockquote>
  
  <p>I had originally Office 2013 installed but 2 months ago I uninstalled and installed the 2007 version. Everything was working fine until now.</p>
  
  <p>I have read on different posts to delete the registry entry corresponding to the above IID. I have tried doing that but no help. I uninstalled/repaired Office as well but no help.</p>
  
  <p>I have tried to register the Microsoft.Office.interop.excel.dll using regasm.exe as well but again no luck. Whats the issue here?</p>