Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have make excel import utility.
it is working perfectly in 32 bit system.
But it is not working in 64 bit system.
it gives below error...
microsoft.jet.oledb.4.0' provider is not registered on the local machine.

i have use below connection string for excel.

for that i have change project-> property-> buld-> target framwork -> x86

But using this, project will generate exe for 32 bit system. so its not work for 64 bit system..

if i change target framwork to x64, then also it is not working..
please give me solution for that...

What I have tried:

ExcelConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pFileName + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=1\";";
                OleDbConnection objConn = new OleDbConnection(ExcelConnStr);
Posted
Updated 21-Apr-17 23:56pm
v2
Comments
Michael_Davies 22-Apr-17 5:53am    
You can run a 32 bit on a 64 bit system, leave it as 32 bit.

Google quickly finds that "currently the Microsoft.Jet.OLEDB.4.0 is not supported for the 64 bit OS."

1 solution

You can run a 32 bit on a 64 bit system, leave it as 32 bit.

Google quickly finds that "currently the Microsoft.Jet.OLEDB.4.0 is not supported for the 64 bit OS."

Also found this which might help;

Jet for Access, Excel and Txt on 64 bit systems - ConnectionStrings.com[^]
 
Share this answer
 

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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