Click here to Skip to main content
15,880,364 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have recently upgraded my excel from 2007 to 2019. I was using this
"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & ExcelPath & ";Extended Properties=""Excel 12.0 Xml;HDR=Yes;"";"	


as a connection string. It was working fine before. Now, it is giving error 3706. and error message as "
Provider cannot be found. It may not be properly installed. 


Another machine with same step works fine with this connection string. I dont understand what is the issue. Can someone help?

What I have tried:

I have tried changing the OLEDB version from 12.0 to 16.0 , it works, but I need to know why it is not working since another machine works with 12.0 itself eventhough both machines have excel 2019, same UFT version.
Posted
Updated 26-Apr-22 19:58pm

1 solution

Simple: one machine has both Excel engines installed, the other only has the latest version.

Chances are you uninstalled 2007 before you installed 2019.

Your connection string should be in a configuration file anyway, so it is set per machine without having to alter any code.
 
Share this answer
 
v2
Comments
semicolonerror 27-Apr-22 9:21am    
Hi @OriginalGriff, Thank you for the answer. You were right about uninstalling 2007 before installing 2019. But can you please provide more clarity on this. In the other machine, I don't see both excel files. So, when you say that machine has both Excel engines, what does that mean? Sorry I am a beginner and I don't quite understand these stuff.
OriginalGriff 27-Apr-22 9:58am    
No, Access is different: Excel has it's own engine which is installed as a part of Excel, and uninstalled when the app is uninstalled.
If you remove a version from your system, that removes the engine as well: in this case Excel 2007 installs 12.0, Excel 2019 installs 16.0, so your connection string needs to reflect the actually installed version on the specific system the app is running on.

The engine can't be installed as part of your app because it is subject to Microsoft licencing T&C's and won't work without a "full" Excel installation.
semicolonerror 27-Apr-22 10:08am    
Wow, that explains a lot. Sincerely thank you for your reply. One more doubt is, what I tried is, changing the OLEDB version, not the excel extended properties.
"Provider=Microsoft.ACE.OLEDB.16.0;Data Source=" & ExcelPath & ";Extended Properties=""Excel 12.0 Xml;HDR=Yes;"";"
This is what I tried in the machine and it worked. So, Can you please tell me how excel version upgrade is affecting this OLEDB
OriginalGriff 27-Apr-22 10:29am    
What did you think the "16.0" part of the Provider meant? :laugh:
semicolonerror 27-Apr-22 10:48am    
Well, Since it is Microsoft.ACE.OLEDB.16.0 I thought it meant the version of Microsoft access database. The one which is present in my machine Microsoft access database engine 2016, So I thought it is related to that. Am I wrong in understanding this?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900