Error when initializing Microsoft Excel interop (64-bit)

2

I have a website using asp.net with Excel 2010 Interop 64-bit (Microsoft.Office.Interop.Excel.dll).

I deployed code to the Windows Server 64 bit.

By using command:

xelApp = new Microsoft.Office.Interop.Excel.Application();

I see there is no error on this own server. But from the other computer (same domain), sometimes (not always), I got the error:

System.Runtime.InteropServices.COMException (0x8000401A): Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 8000401a.

How could I fix this issue?

By install the Office 2010 64-bit to server 64-bit, I cannot see the Excel in DCOM config.

Please advise.

Thanks.

c#
excel-2010
asked on Stack Overflow Jun 22, 2016 by user3011414

2 Answers

0

Check the folowing:

  1. Is Microsoft Office Installed on the server? If not, you may install the MS Office and this feature should be working.
  2. If you do not want to install the MS Office, you can use a similar tool, which is ClosedXML - 1 https://closedxml.codeplex.com/

I recommend to replace the Interop Excel with the ClosedXML.

answered on Stack Overflow Jun 22, 2016 by Kiran Cornelio
0

That error code occurs due to security issues like insufficient privelage or due to incorrect username, password.

answered on Stack Overflow Jun 22, 2016 by Ozesh

User contributions licensed under CC BY-SA 3.0