从Excel读取时出现连接错误 [英] Connection error while reading from excel

查看:92
本文介绍了从Excel读取时出现连接错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在尝试使用c#读取excel文件。我的连接字符串是

Hi,

i am trying to read excel file using c#. my connection string is

string con = @"Provider=Microsoft.Jet.OLEDB.12.0;Data Source="+ AppDomain.CurrentDomain.BaseDirectory + "CIS DataTemplate.xlsx;Extended Properties='Excel 12.0;HDR=Yes;'";





给出错误,因为'Microsoft.Jet.OLEDB.12.0'提供商未在本地计算机上注册。





尝试cheanging配置漫游平台是从cpu到x86。它没有用。

i我正在使用Windows 7 64位操作系统。



你能帮我解决这个问题吗?







提前致谢。



giving error as 'Microsoft.Jet.OLEDB.12.0' provider is not registered on the local machine.


tried to cheanging configuration mangaer platform is from cpu to x86. it is not working.
i am using windows 7 64 bit operating system.

Can you help me to resolve this issue?



Thanks in advance.

推荐答案





无需做任何事情,但请按以下方式执行以下操作: -



申请表已经在IIS上托管了?如果是,那么在相应的应用程序池下更改启用32位应用程序= true。



我相信这最近会起作用我也面临着这个问题。
Hi,

No need to do anything but please do the following stuff as follows:-

Application has been hosted on IIS?if yes then change 'Enable 32 bit application'=true under the respective application pool.

I am sure this will work as recently the same problem faced by me as well.


这篇关于从Excel读取时出现连接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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