locked
What is the better way to extract data from excel? RRS feed

  • Question

  • User1590954823 posted

    I am using excel file to get data for data driven testing.
    I have list of objects which it should take from excel then run my applicatio via class file.
    Now here is the thing, I am trying via OLEDB connection with excel version 15 (Office 365). When I run my application, it says The 'Microsoft.ACE.OLEDB.12.0' provider is not registered in the local machine. But I can find the dll file at "C:\Program Files\Microsoft Office 15\root\vfs\ProgramFilesCommonX86\Microsoft Shared\OFFICE15."

    Is there any solution for this.
    Please I need badly need help for this problem.

    Thanks

    Tuesday, December 8, 2015 5:28 PM

Answers

All replies

  • User753101303 posted

    Hi,

    Humm. Seems a confusion between Microsoft.Jet.OleDb.4.0 and Microsoft.ACE.OLEDB.12.0. If this is what you really have, change to the connection string to use  Microsoft.ACE.OLEDB.12.0 rather than Microsoft.Jet.OleDb.12.0. (4.0 was the latest).

    If this is rather a typo when typing your question, it is likely a 32 bit vs 64 bit issue ie the main app and its DLLs must have the same architecture so if your web app runs as a 64 bit process it will try to load a 64 bit version of this DLL (and the one which is installed could be a 32 bit version). In this case your best bet might be to force the 32 bit mod. See http://stackoverflow.com/questions/16226582/how-can-i-force-iis-express-to-run-in-32-bit-mode (else you would need to uninstall Office and reinstall the other version).

    If the app is written properly you'll still be able to run in 64 bit mode (and you'll have to install the 64 bit version of this driver from https://www.microsoft.com/en-US/download/details.aspx?id=13255

    Tuesday, December 8, 2015 6:12 PM
  • User1590954823 posted

    Hi PatriceSc,

    Sorry I meant was Microsoft.ACE.OLEDB.12.0 for Excel with latest version 15 (Reference). Also I will not be able to download any software according to requirement. Is there any other solution through which I can do that?

    Thanks

    Tuesday, December 8, 2015 7:49 PM
  • User753101303 posted

    So it seems to be the 32 bit vs 64 bit issue. Check which version of Office is installed ("about" dialog). On the web site side, check https://msdn.microsoft.com/en-us/library/system.environment.is64bitprocess(v=vs.110).aspx. If the issue is that this is a 32 bit Office version and that IIS Express runs in 64 bit mode then the earlier link I posted about forcing IIS Express to run in 32 bit mode should apply.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, December 8, 2015 10:14 PM
  • User614698185 posted

    Hi jazz0101,

    You could change the application pool in IIS to enable 32-bit applications. If you are using the full version of IIS, you can use the management tool to do this (Control Panel » Administrative Tools » Internet Information Services (IIS) Manager).

    Click on Application Pools in the left pane, then select the application pool for the relevant site in the center pane, and click Advanced Settings on the right.

    Locate the Enable 32-bit Applications entry and change False to True.

    Please see: http://www.mikesdotnetting.com/article/280/solved-the-microsoft-ace-oledb-12-0-provider-is-not-registered-on-the-local-machine

    Best Regards,

    Candice Zhou

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, December 10, 2015 9:55 AM