Excel ODBC 和 64 位服务器 [英] Excel ODBC and 64 bit server
问题描述
使用 ASP.NET 我需要更新一个 excel 模板.
using ASP.NET I need to update an excel template.
我们的服务器以 64 位模式运行 Windows 2008.
Our server is running Windows 2008 in 64 bit mode.
我使用以下代码访问excel文件:
I am using the following code to access the excel file:
...
string connection =
@"Provider=MSDASQL;Driver={Microsoft Excel Driver (*.xls)};DBQ=" + path + ";";
...
如果应用程序池设置为启用 32 位应用程序,代码将按预期工作;但是我使用的 oracle 驱动程序失败了,因为它只有 64 位.
IF the application pool is set to Enable 32 bit applications the code works as expected; however the oracle driver I am using fails as it is only 64 bit.
如果启用 32 位应用程序设置为 false,excel 代码将失败并显示错误:
If Enable 32-bit applications is set to false the excel code fails with the error:
未找到数据源名称且没有指定的默认驱动程序
Data source name not found and no default driver specified
有什么建议吗?
推荐答案
Microsoft Office 团队刚刚发布一个64 位驱动程序
The Microsoft Office team has just released a 64-bit driver
这篇关于Excel ODBC 和 64 位服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!