Click here to Skip to main content
15,888,014 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All!
I want to read/write excel file using C #. But I can not connect to Office 2013
Here is my connection string:

C#
OleDbConnection oledbConn;
oledbConn = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties='Excel 12.0;HDR=YES;IMEX=1;';");


Thanks for everyone's help!
Posted
Comments
Ron Beyer 1-Aug-13 22:59pm    
Do you have some kind of question? Description of the error or why you can't connect?
Mr.thang 1-Aug-13 23:19pm    
Dear Ron Beyer!
I encounter the following error:
Error: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine
I do not understand the provider's current Office version!
Thanks!

1 solution

 
Share this answer
 
v2
Comments
Mr.thang 1-Aug-13 23:55pm    
Hi Sushil Mate!
I'm currently using Office 2013 version.
can I install 2007 Office System Driver?
Sushil Mate 2-Aug-13 0:00am    
Please check the update links, you will get idea.
Mr.thang 2-Aug-13 0:12am    
Thanks Sushil Mate!
I will try.

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