Provider cannot be found ADODB error while connecting to Excel 2016 or CSV from Internet Explorer - windows-10

Background: In our organization, there is a html tool which runs in the Browser(IE11). The tool has a couple of stages and data from each stage is stored in a SharePoint list. In the final stage, all this data needs to be reconciled from a data set which comes from banks in a spreadsheet. Here the tool uses ADODB connection to connect to the Excel file, read the data from it and match with the data on SharePoint.
Problem: Recently after a windows 10 upgrade, the tool stopped exactly on the connection line throwing an error - "Provider cannot be found. It may not be installed correctly". I also got the Microsoft access Database engine re-installed from IT but to no good(this was after reading about answers to my query online)
I am the developer of this tool and it works just fine on my laptop. Below are the specifications of the connection string and other details of software installed
Windows Version: 1511(OS Build 10586. 1176) Windows 10 64 bit
IE: 11
IE version: 11.1176.10586.0
IE Update Version: KB4040685
Office: 2016
Connecting to Excel(version) - 2007-2010 (xls, xlsx format)
Connection Object: ADODB.Connection (via ActiveXObject in JavaScript )
Connection String Parameters
•Provider - Microsoft.ACE.OLEDB.12
•Extended Properties - Excel 8.0 (Also tried Excel 12.0 xml)
•HDR - Yes
•IMEX = 1
OLEDB Drivers installed on the machine: Microsoft ACE 12.0, 16.0 and Jet 4.0
This is the exact same configuration on my laptop and the tool is easily able to connect to Excel or Access also for that purpose.
I have also tried the below, nothing was a success
1.Used Jet.4.0 in the connection string - Here I got error "External table is not in the expected format" & "Unexpected error from database"
2.Tried using ODBC drivers with error - "Data source name not found and no drivers installed"
3.Opened the tool in 32 bit environment
4.Made a HTA app and ran that in 32 bit mode
I also found that in my laptop in the Microsoft Shared folder within program files, there exist Office 14 & 15 folders, but they don't exist in the newer laptops and the same in 32 bit folder of Program files(x86). Would it be possible that having those folders is making the difference?
Please help.

I have learned that installing Microsoft Access Database Engine 2010 (or 2007) on end-user machines fixes the issue, as adodb.dll file is required to be registered on computers using that provider.

Related

Connecting Excel 2016 to Postgres

I am trying to have Postgres show as one of the data connection in Excel 2016. Following MS Office instructions I installed Ngpsql data provider. I used msi for installation so according to the instructions provided in the wizard the dlls were registered in GAC and the provider was registered in machine.config (I checked - the entry is there).
Yet Postgres is still not showing as an option in Excel > Data > New Query > From Database list.
Searching the web shows old out of date discussions. Developers of of Ngpsql direct questions to Stack Overflow. So please help.
Postgres data can be used in Excel 2016 but it requires the ODBC driver and an external setup of the database server. As far as I can tell the Npgsql drivers do not work with my version of Excel which is 2016 MSO 32-bit a.k.a "Home Premium".
The Postgres ODBC driver is available here: https://www.postgresql.org/ftp/odbc/versions/msi/ Download and install the latest version. It should install without needing a system reboot.
Setup a DSN (I used machine) using the ODBC Data Sources (XX-bit) setup application. The driver version needs to match your Excel version.
After testing the connection in the setup screen, open Excel 2016 and use the Data -> New Query -> From Other Sources -> From ODBC menu to open the query screens. This seems to be the most modern interface available in Excel.

Error in OleDbConnection.Open() when trying to read Excel XLSB

I'm using Visual Studio 2013 with MVC 3 Razor. I'm able to upload and save XLSB file, and I'm trying to read data from the uploaded XLSB. I have the below connection string and method to initialize the OleDbConnection:
strConStr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Projects\Excel1.xlsb;Extended Properties='Excel 8.0;HDR=True'";
OleDbConnection connExcel = new OleDbConnection(strConStr);
The error occur at connExcel.Open(). Below is the error message:
An exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll but was not handled in user code
Additional information: This file was created in a previous beta version of Excel 2007. Open the file with Excel 2007 to save it to the most recent version of the Excel 2007 file format before opening the file in Access 2007.
I had AccessDatabaseEngine installed in my PC. In my control panel, I have the following installed engine info:
Name: Microsoft Office Access database engine 2007 (English)
,Size: 19.2 MB
,Version: 12.0.4518.1031
I'm not sure if this is the correct version to read XLSB file. My PC is x64 bit by the way.
My colleague also have the same type of Microsoft Office Access database engine 2007 installed in his PC but his version is "12.0.66XX", the code works fine on his side.
Please let me know if I need to install another version of Access Database Engine, or any other way to resolve this error.
I'm able to resolve this after a long studies and research.
Apart of the Microsoft Office Access database engine 2007 that is already installed in my machine, I also download and install Microsoft Access Database Engine 2010 Redistributable.
After that, I need to download Microsoft Office Access Runtime and Data Connectivity 2007 Service Pack 2 (SP2) to install and then reboot my machine.
Everything work like magic afterwards.
And this is my working connection string:
strConStr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Projects\Excel1.xlsb;Extended Properties='Excel 12.0;HDR=True'";

SSIS and 64bit excel

I have researched this thoroughly but I've yet to find a satisfactory answer.
I am using SQL Server Data Tools 2010 and Microsoft Office 2013 64-bit. I know that there is a compatibility problem and I am trying to solve it because I know for a fact that you can use an .xlsx file as a data source in a Data Flow.
First I tried setting Run64BitRuntime to False in Project -> Properties -> Configuration Properties - > Debugging but it didn't work
Whenever I try importing an .xlsx file I get the same error
Microsoft Visual Studio
------------------------------
Could not retrieve the table information for the connection manager
'Source Path'. Failed to connect to the source using the connection
manager 'Source Path'
------------------------------
So I tried downloading the "Microsoft Access database engine 2010" as so many suggested. The 64-bit installed successfully but the 32-bit returned the following error
You cannot install the 32-bit version of Microsoft Access database engine 2010
because you currently have 64-bit Office products installed.
Now I know I am missing a step here cause while I can see "Microsoft Access database engine 2010" in the list of installed programs in control panel it does not show up as an option in the Provider list when I am trying to create a new Connection Manager.
So before I result following the instruction on this blog I would like to ensure there is no easier way of solving the problem
Thank you in advance for you time.
If you're machine is x64, forget about Excel, as there is no driver available.
Just convert the file to CSV and use a Flat File Connector instead.
Ok, the answer was so ridiculously easy that I kind of feel ashamed for this post now.
If you are using Microsoft Office 2013 64-bit and want to work with SSIS you have to download and install the 32-bit Microsoft Access Database Engine 2010 Redistributable, not the 64-bit, set Run64BitRuntime to False and everything will work like a charm.

Cannot read Excel files in SSIS 2008

I'm stuck trying to get SSIS 2008 to read an Excel file.
Yesterday, I migrated our SSIS project from 2005 to 2008, and though the upgrade said it worked, I cannot get it to read an Excel file. I read online that I needed to upgrade the JET drivers to Office 2007 (AccessDatabaseEngine.exe), which I did. And voila! Everything started working!
Unfortunately today, I rebooted my machine, and everything is broke again. Same error as before. I've tried re-installing the JET driver, and even installed SQLExpress 2008, which I read also has the upgraded JET driver. But to no avail.
I cannot even create a brand new SSIS project/package, add an Excel Connection Manager, pointing to a simple Excel file that I made up of just a few numbers in column A, add a new Data Flow Task, and w/in it, add an Excel source using bound to the Excel Connection Manager. When I do something as simple as this, I get:
Unspecified Error (real helpful)
SSIS Error Code: DTS_E_OLEDBERROR
Error Code: 0x80004005
Source: "Microsoft JET Database Engine"
DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER
Hresult: 0xC020801C
I don't have a 64bit PC, and I did have everything working until I rebooted my PC.
I only have Office 2003, and I have the SQL2008 Dev Tools installed.
Any help or suggestions would be appreciated. Is there a way to get more detailed information of the failure?
I've had more success in reading office documents on x64 environments using the newer ACE drivers:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c06b8369-60dd-4b64-a44b-84b371ede16d&displaylang=en
Your connection string will be something like:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myfile.xls;Extended Properties="Excel 12.0 Xml;HDR=YES";
Might be worth a try!

Upload An Excel File in Classic ASP On Windows 2003 x64 Using Office 2010 Drivers

So, we are migrating an old web app from a 32-bit server to a newer 64-bit server. The app is basically a Classic ASP app. The pool is set to run in 64-bit and cannot be set to 32-bit due to other components. However, this breaks the old usage of Jet drivers and subsequent parsing of Excel files.
After some research, I downloaded the 64-bit version of the new 2010 Office System Driver Beta and installed it. Presumably, this allows one to open and read Excel and CSV files.
Here's the snippet of code that errors out. Think I followed the lean guidelines on the download page:
Set con = Server.CreateObject("ADODB.Connection")
con.ConnectionString = "Provider=Microsoft.ACE.OLEDB.14.0;Data Source=" & strPath & ";Extended Properties=""Excel 14.0;"""
con.Open
Any ideas why?
UPDATE: My apologies. I did forget the important part, the error message:
ADODB.Connection error '800a0e7a'
Provider cannot be found. It may not
be properly installed.
/vendor/importZipList2.asp, line 56
I have installed, and uninstalled/reinstalled twice.
I encountered a similar issue a little while ago and I found out that there's actually a bug in the installer package for the ACE 14 driver. The driver is being registered as "Microsoft.ACE.OLEDB.12.0". In my case I could get things to work just by changing my connection string to 12 as opposed to 14.
Evidence on the bug: Microsoft Connect
It could be the Excel version in the Extended Properties parameter. Excel 14 is for Office 2010. While the driver may be Office 2010 I would presume your Excel documents are not.
Excel 2007 - v12
Excel 2003 - v8
From http://www.connectionstrings.com for Excel 2007:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myExcel2007file.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES";
You could try replacing the ACE.OLEDB.12.0 with ACE.OLEDB.14.0 to match the driver version.
Here http://forums.asp.net/p/1128266/1781961.aspx is a suggestion to split your app into 32 and 64 bit components and transfer data via COM. To quote:
What you need to do is split your application into a 32 bit part and a 64 bit part, use COM interop to cross the 64/32 bit boundary. For instance, drop the code (just a simple class library compiled as 32 bit) that retrieves the Excel data into a COM+ (System.EnterpriseServices) as a "server type" application, and call that server methods from your 64 bit Windows service. This is exactly why System.EnterpriseServices are made for.
Looks like it is "14" ("14.0") for Excel. But "12" ("12.0") for ACE.
From this download:
http://www.microsoft.com/downloads/en/details.aspx?familyid=C06B8369-60DD-4B64-A44B-84B371EDE16D&displaylang=en
I found this snipplet:
**2.If you are an application developer using OLEDB, set the Provider argument of the ConnectionString property to “Microsoft.ACE.OLEDB.12.0”
◦If you are connecting to Microsoft Office Excel data, add “Excel 14.0” to the Extended Properties of the OLEDB connection string.**
HOWEVER!!!
The instructions from the download page seem to be wrong....causing some of this confusion.
From here:
http://social.msdn.microsoft.com/Forums/en/adodotnetdataproviders/thread/686d8ebb-0da3-4f0c-bf16-9c650f8dcb32
//Quote //Paul P C
The instructions are incorrect. It should be Excel 12.0. I wish they would fix this mistake at the download site.
//End Quote
I have verified that this connection string works for me:
"Provider=Microsoft.ACE.OLEDB.12.0;Data Source='C:\MyFile.xls';Extended Properties='Excel 12.0;HDR=NO;IMEX=1;';"
I faced the same problem, finally, I realized that the error is that the connection string should be modified in 64 bit!
To get the right one, install visual basic 6 and drag the Microsoft data access control,through its wizard, open the file you want, and let it write the connection string to you.

Resources