OFFICE error: can not be type “Microsoft.Office.Interop.Excel.

Time:2024-6-14

Cannot force a COM object of type “Microsoft.Office.Interop.Excel.ApplicationClass” to be converted to interface type “Microsoft.Office. Interop.Excel._Application”. This operation fails because the QueryInterface call to the COM component of the interface with the IID “{000208D5-0000-0000-C000-000000000046}” fails with the following error: The library is not registered. (Exception from HRESULT:0x8002801D (TYPE_E_LIBNOTREGISTERED)).
Solution: redundant version, open the registry, find the computer \HKEY_CLASSES_ROOT\TypeLib{00020813-0000-0000-C000-000000000046}\1.9, delete it, leaving only 1.8, you will not report errors!OFFICE error: can not be type