Hello,
I am trying to read data from an Excel file in my Console Application using Microsoft.Office.Interop.Excel (V15.0.4795.1000).
Earlier it was working fine when the job was running on Windows 2016 Server. But while running it on Windows 2019 Server it is throwing an exception.
The Microsoft Excel Application is installed in Server (2019).
My Code to access the file :
Excel.Application xlApp = new Excel.Application();
Excel.Workbook xlWorkbook = xlApp.Workbooks.Open(fileInfo.FullName); //This line is throwing an exception
Exception :
/the server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))/.
Is this because of any server compatibility issues or NuGet version issue or anything else, I'm not sure
Thanks in Advance for your help.
Regards,
Prince