我試圖通過C#創建一個Excel文檔。當我運行應用程序,它提供了以下錯誤:加載類型庫/ DLL時出錯(Microsoft.Office.Interop.Excel.Application)
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: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).
這是工作的罰款之前,我已經升級,從2010 的Visual Studio 2012年。我也從2010年到2013年升級辦公室。
- 在輸出窗口沒有錯誤/警告。
- 的Microsoft.Office.Interop.Excel引用添加