none
Error on only Azure - 'Microsoft.ACE.OleDb.12.0' provider is not registered on the local machine.

    Question

  • I am working with MS Excel files in my web application built in Azure environment. I never run into following error when I am trying to access the excel file on my development fabric. But once I deploy to Azure in cloud, I get this error message.

    The 'Microsoft.ACE.OleDb.12.0' provider is not registered on the local machine.

    I was under impression that development fabric for Azure is replica of the environment you would expect in Cloud.

    Is there something wrong I am doing here? Is ACE.OleDb provider not present in Azure?

    Thursday, October 14, 2010 10:47 PM

Answers

  • The development fabric is a simulation of the Azure cloud - not a replica. It is possible there is software installed on your development machine that is not available in an Azure VM - such as Office.  I believe 'Microsoft.ACE.OleDb.12.0 ships with Office.
    • Marked as answer by S I Monday, October 18, 2010 11:24 PM
    Thursday, October 14, 2010 11:36 PM
    Answerer
  • If you only need to work with Excel 2007 formats or later (xlsx), you can use the OpenXml SDK. This SDK requires installation on your local machine. But you can simply reference the DocumentFormat.OpenXml.dll assembly in your Web/Worker Role, and set Copy Local to true. It will work in the cloud. It also doesn't require Office to be installed on the cloud machine.

    But if you need to work with older versions (the binary xls format), I'm not aware of any SDKs that do not rely on Office.


    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by S I Monday, October 18, 2010 11:23 PM
    Monday, October 18, 2010 7:12 AM

All replies

  • The development fabric is a simulation of the Azure cloud - not a replica. It is possible there is software installed on your development machine that is not available in an Azure VM - such as Office.  I believe 'Microsoft.ACE.OleDb.12.0 ships with Office.
    • Marked as answer by S I Monday, October 18, 2010 11:24 PM
    Thursday, October 14, 2010 11:36 PM
    Answerer
  • Neil is correct, Microsoft.ACE.OleDb.12.0 is not installed on the cloud machines. You can try to include it in your deployment package.

    In addition, AFAIK, Microsoft.ACE.OleDb.12.0 only supports x86, so you cannot use it from a Web/Worker Role directly. You have to use the workaround described in http://blogs.msdn.com/b/haniatassi/archive/2009/03/20/using-a-32bit-dll-in-the-windows-azure.aspx.


    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, October 15, 2010 4:43 AM
  • Neil & Yi-Lun

    Okay, if I cannot use Microsoft.ACE.OleDb.12.0 to process EXCEL file in Azure, what are the other alternatives?

    I just need to read the data from the excel sheet.

    Are there any reliable and proven 3rd party DLLs or SDKs's  available which will work in Azure environment for sure?

    Friday, October 15, 2010 8:55 PM
  • If you only need to work with Excel 2007 formats or later (xlsx), you can use the OpenXml SDK. This SDK requires installation on your local machine. But you can simply reference the DocumentFormat.OpenXml.dll assembly in your Web/Worker Role, and set Copy Local to true. It will work in the cloud. It also doesn't require Office to be installed on the cloud machine.

    But if you need to work with older versions (the binary xls format), I'm not aware of any SDKs that do not rely on Office.


    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by S I Monday, October 18, 2010 11:23 PM
    Monday, October 18, 2010 7:12 AM