我收到類似 的錯誤無法投射類型爲 的COM對象'Microsoft.Office.Interop.Excel.ApplicationClass'接口類型'Microsoft.Office.Interop.Excel._Application'。 此操作失敗,因爲IID爲「{000208D5-0000-0000-C000-000000000046}' 的接口的COM組件上的查詢接口調用失敗,原因是以下錯誤:加載類型庫/ DLL時出錯。 (來自HRESULT的異常:0x80029C4A(TYPE_E_CANTLOADLIBRARY))。無法將類型爲'Microsoft.Office.Interop.Excel.ApplicationClass'的COM對象轉換爲接口類型'Microsoft.Office.Interop.Excel._Application'
異常獲取當我試圖在vb.net中打開一個應用程序。 我試圖重新安裝excel,但沒有解決,欣賞它,如果有人可以幫助我在此
我能夠通過從控制面板中的添加/刪除程序「修復」Office來修復。類似的問題在這裏:https://stackoverflow.com/questions/28066719/unable-to-cast-com-object-of-type-microsoft-office-interop-excel-applicationcla – DenverJT
可能重複[無法投射COM對象鍵入'microsoft.Office.Interop.Excel.ApplicationClass'到'microsoft.Office.Interop.Excel.Application'「](https://stackoverflow.com/questions/28066719/unable-to-cast-com-object-of -type-microsoft-office-interop-excel-applicationcla) – quinestor