In my C# application i am importing and exporting data to excel. I have office 2013.
I am using following code:
using Excel = Microsoft.Office.Interop.Excel;
Excel.Application _excelApp = null;
_excelApp = new Excel.Application();
This code was working fine but recently i installed Microsoft project professional 2013, it also update office. After this i am getting error in _excelApp = new Excel.Application();
Error is:
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)).