Error Message:
'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)).

This problem is caused by incorrect COM Interop settings in the Windows registry. This can be caused by installing a newer version of Microsoft Office, and then removing it and installing an older version instead. There are other ways this could happen.

Because the resolution provided by Microsoft requires registry changes, the easiest fix is to have your IT perform a detailed Office repair on your machine after removing any old versions of Microsoft Office. Then, try again. If the issue still exists, they can completely uninstall, reboot, and then reinstall Office.

The key to remove is: HKEY_CLASSES_ROOT > TypeLib > {00020813-0000-0000-C000-000000000046} > 1.8/1.7