Search code examples
azureazure-devopsazure-web-app-serviceazure-webjobs

Is there a way to register COM class factory in Azure App Service?


I have deployed my application on azure as webjobs. Application use the Microsoft.Office.Interop.Excel.dll and Offcie.dll to convert the flat file to excel file. I know Azure do not have office on it and it is throwing error

"Error Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80040154. Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))".

Is there a to register the COM class in Azure app service? This issues was there in Azure from 8-10 years, in this years has microsoft come up with any solution or alternative for this?

I do not want to use other open source/Openxml because I have to re-write the whole application.


Solution

  • Using Microsoft.Office.Interop.Excel.dll depends on the server to install Office software.

    As far as I know, azure app services are currently not supported and cannot register COM class.

    If you really don't want to use third-party libraries, such as Openxml, you can only choose virtual machine, install office, and use it.

    Related post:

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