Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Exception while accessing Excel File using Microsoft.Office.Interop.Excel in Console App

(0) ShareShare
ReportReport
Posted on by 11
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
  • Martin Dráb Profile Picture
    232,980 Most Valuable Professional on at
    Exception while accessing Excel File using Microsoft.Office.Interop.Excel in Console App
    As this question isn't about Microsoft Dynamics, you should rather use a different forum (maybe this one).

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,219 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,980 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans