在C#中将字符串连接到Excel office 2013 [英] Connect string to Excel office 2013 in C#

查看:276
本文介绍了在C#中将字符串连接到Excel office 2013的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!

我想用C#读取/写入excel文件。但我无法连接到Office 2013

这是我的连接字符串:



Hi All!
I want to read/write excel file using C #. But I can not connect to Office 2013
Here is my connection string:

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!

推荐答案

您需要安装2007 Office System驱动程序:数据连接组件。



http://www.microsoft.com/en-us/download/details.aspx?id=23734 [ ^ ] <更新:



http://stackoverflow.com/questi ons / 16610940 / import-excel-2013-to-vs-microsoft-ace-oledb-12-0-is-not-registered-on-local [ ^ ]



http://stackoverflow.com/questions/14562587/microsoft-ace-oledb-12-0-provider-can-no-longer-open -mdb-under-windows-8 [ ^ ]
You need to install 2007 Office System Driver: Data Connectivity Components.

http://www.microsoft.com/en-us/download/details.aspx?id=23734[^]

Updated:

http://stackoverflow.com/questions/16610940/import-excel-2013-to-vs-microsoft-ace-oledb-12-0-is-not-registered-on-the-local[^]

http://stackoverflow.com/questions/14562587/microsoft-ace-oledb-12-0-provider-can-no-longer-open-mdb-under-windows-8[^]


这篇关于在C#中将字符串连接到Excel office 2013的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆