office365oledbhta

New Connection String with Office 365


I have an HTA application that has worked for years with no issue, and I am now having issues since being forced to update to Office 365.

Here is the connection string:

objConnection.Open "Provider=Microsoft.ACE.OLEDB.12.0;" & _
            "Data Source=<file name>.xls;" & _
                "Extended Properties=""Excel 8.0;HDR=No;"";"

Here is the error I now get: Error: Provider cannot be found. It may not be properly installed. Code: 0

I have scoured this site and others looking for and trying solutions.

I have tried with the "Microsoft Access Database Engine 2010 Redistributable" and "Microsoft Access Database Engine 2016 Redistributable" installed, not installed.

I have tried any and all combinations of Microsoft.ACE.OLEDB.8.0, Excel 12.0, Excel 16.0.

Any and all help is appreciated. Thanks!


Solution

  • Even easier than trying to figure out how to recode this was making the default application for *.hta files C:\Windows\SysWOW64\mshta.exe. Haven't found any unintended consequences yet. Make sure to have Microsoft Access Database Engine 2010 Redistributable and/or Microsoft Access Database Engine 2016 Redistributable installed. Had both installed... not sure which is required.