✅ RPC not available on trying to read a Excel workbook using interop
I was trying to use
Microsoft.Office.Interop.Excel
to open a excel file and read its content. but I get "RPC not available" error on Excel.Application.Workbooks.Open
and Excel.Application.Quit
any idea what could be going wrong?
No extra Add ins. Excel works fine manually.13 Replies
Have you tried opening excel in your local machine?
yes, excel opens up fine in the machine
Which dotnet version?
Can I see the code?
.net framework 4.6.2
It's an odd problem
I checked the internet but only could find info about Visual Basic
At this point, I personally would optate for using a library
To deal with excel files
How are your possibilities?
what are some recommended libraries for that?
I have seen
ClosedXML
being recommended in many placesI'd go for IronXL but not sure if it works on Framework
Is it a new project? any chance on migrating to .NET 8?
no, it is an old project. migrating will be lot of work since theres lot of code
I see
I checked and it supports Framework
you may be fine with it
thanks, will try that library out
give a feedback for me to know if it worked
BTW, try not to fall into the server-side Office automation trap https://support.microsoft.com/en-us/topic/considerations-for-server-side-automation-of-office-48bcfe93-8a89-47f1-0bce-017433ad79e2
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View