HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG), error, my website is on azure cloud

0

This error is coming when i am writing excel file thru c# code using interop from website url. It is working perfectly fine on local machine. after running publish of my website to Azure Cloud base server. It is not working on website url.

If i have to install MS Excel on Azure, how can i do that.

and

If there is any other solution, please guide me.

c#
.net
azure
interop
excel-interop
asked on Stack Overflow Jun 19, 2018 by Faseeh Haris

1 Answer

2

E_CLASSNOTREG is "Class not registered". You are likely using the Office Interop Assemblies, which require the appropriate version of Office to be installed.

If i have to install MS Excel on Azure, how can i do that.

As far as I am aware, you cannot install them for Azure web sites. You would need to use an Azure Virtual Machine to install office and get appropriate licensing. I'm not sure either if it is technically "correct" to use Office server-side from a licensing perspective.

Another option to consider is using the Open XML SDK which does not rely on Excel being installed, but may be more difficult to use. There are many other 3rd party libraries to choose from as well.

answered on Stack Overflow Jun 19, 2018 by vcsjones

User contributions licensed under CC BY-SA 3.0