问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/50935980/hresult-0x80040154-regdb-e-classnotreg-error-my-website-is-on-azure-cloud