After downgrading from Excel 2013 to 2010 (i.e. removing 2013 and installing 2010) when I try to access the Excel OM from my add-in like this:
if (this.Application.ActiveWorkbook == null)
{
return;
}
I get the following Exception:
Unable to cast COM object of type 'System.__ComObject' 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)).
I have taken the following steps to resolve the issue but none have worked:
However, nothing seems to work. Is there something I'm missing or do I actually have to wipe the machine?
EDIT: My guess is that there is still come conflict in the registry but I have no idea where...
Thanks in adv!
Found the solution - I forgot to remove one reference to Excel 2013:
HKEY_CLASSES_ROOT\TypeLib{00020813-0000-0000-C000-000000000046}\1.8
After removing 1.8
my corrected registry looks like this:
...
User contributions licensed under CC BY-SA 3.0