Can not open new excel 2016 files in Visual Studio 2013. RRS feed

  • General discussion

  • Hello!

    We are running into the problem to open excel files programmatically, after the new Microsoft Office 2016 was installed. We use Visual Studio 2013 for development. To open excel 2010/2007 files we used Provider=Microsoft.Jet.OLEDB.4.0 in the connection string. I know, that for newer versions of Microsoft Office need a newer provider: Provider=Microsoft.ACE.OLEDB.12.0. 

    I changed the code to accommodate it, added a reference of Microsoft Excel 16.0 Object Library and Microsoft.Office.interop. Excel.dll, modified the connection string :

    connStr = "Provider=Microsoft.ACE.OLEDB.12.0; " +
                           "Data Source= ' " + FileName + "';" +
                           "Extended Properties= ""Excel 12.0;HDR=Yes;IMEX=1"""

    but still have an error "Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine."  

    Can you please tell me if the Microsoft.ACE.OLEDB.12.0' the one we need to use to open for excel 2016 in VS 2013?

    Thank you

    Monday, July 18, 2016 4:19 PM