Trying to read Excel using VB.net got Error Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

Answered Trying to read Excel using VB.net got Error Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

  • Friday, September 21, 2012 7:48 PM
     
     

    Tried to read Excel file using Provider=Microsoft.ACE.OLEDB.12.0 got Error 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine'. OS Windows 7 64 bits, MS Office 2010 (installed AccesDB engine 64 bits) , Visual Studio 2101 Pro

    Here it is code for connection

    connection = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;" _

                                                              & "Data Source=" & sourcePath & "\" & sourceFile & ";" _
                                                              & "Extended Properties=""Excel 12.0;HDR=NO;IMEX=1""")

    Changed project Advanced Compile settings from AnyCPY to x86 Error is gone. I cannot keep that project settings because all other programmers use AnyCPU options. Moreover, when I tried run local program that was built using that setting I got the same problem. Could somebody explain to me what is wrong and how I can fix it? 


    Lev

All Replies

  • Friday, September 21, 2012 7:48 PM
     
     

    Tried to read Excel file using Provider=Microsoft.ACE.OLEDB.12.0 got Error 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine'. OS Windows 7 64 bits, MS Office 2010 (installed AccesDB engine 64 bits) , Visual Studio 2101 Pro

    Here it is code for connection

    connection = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;" _

                                                              & "Data Source=" & sourcePath & "\" & sourceFile & ";" _
                                                              & "Extended Properties=""Excel 12.0;HDR=NO;IMEX=1""")

    Changed project Advanced Compile settings from AnyCPY to x86 Error is gone. I cannot keep that project settings because all other programmers use AnyCPU options. Moreover, when I tried run local program that was built using that setting I got the same problem. Could somebody explain to me what is wrong and how I can fix it? 


    Lev

  • Saturday, September 22, 2012 11:25 AM
    Answerer
     
     Answered

    Not sure but have you tried 

    Provider=Microsoft.ACE.OLEDB.14.0


    Best Regards,
    Asadulla Javed, Kolkata
    ---------------------------------------------------------------------------------------------
    Please do not forget to click “Vote as Helpful” if any post helps you and "Mark as Answer”if it solves the issue.

  • Sunday, September 23, 2012 2:47 PM
     
     

    Do you have Excel installed on the local machine?

    Check also this http://www.youtube.com/watch?v=HkCOCR2BOxQ