Could not find installable ISAM
程序中去读EXCEL文档,以前一直参考《Asp.net读取Excel文件 2》http://www.cnblogs.com/insus/archive/2011/05/05/2037808.html这个连接语句或是方法。
但在这次开发中,再次引用时,即出现了异常:“Could not find installable ISAM”。
奇怪!
经过一番查阅资料和修改,Insus.NET把代码稍作修改一调整:
程序又可以跑起来了...
public static string ExcelConnectionString(string filePhysicalPath)
{
string connectionString = string.Empty;
string fileExtension = filePhysicalPath.Substring(filePhysicalPath.LastIndexOf(".") + );
switch (fileExtension)
{
case "xls":
connectionString = String.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=\"Excel 8.0;HDR=YES;IMEX=1\"", filePhysicalPath);
break;
case "xlsx":
connectionString = String.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=\"Excel 8.0;HDR=YES\"", filePhysicalPath);
break;
}
return connectionString;
}
Source Code
Could not find installable ISAM的更多相关文章
- C# Oledb 连接Access数据库字符串
string connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + dbFile + ";Persist ...
- composer 报错:Your requirements could not be resolved to an installable set of packages 解决方法
composer 报错: - Your requirements could not be resolved to an installable set of packages xxxxxxxxxxx ...
- C# EXCEL导入 混合列文字为空,找不到可安装的 ISAM的解决办法
C# EXCEL导入 混合列文字为空,找不到可安装的 ISAM的解决办法 使用C#导入 Excel数据到 DataTable,如果连接串中只写 Excel 8.0,则正常的字符列,数值列都没有问题,但 ...
- System.DateUtils 3. IsPM、IsAM 判断是否为上、下午
编译版本:Delphi XE7 function IsPM(const AValue: TDateTime): Boolean; inline;function IsAM(const AValue: ...
- (转)MySQL数据库引擎ISAM MyISAM HEAP InnoDB的区别
转自:http://blog.csdn.net/nightelve/article/details/16895917 MySQL数据库引擎取决于MySQL在安装的时候是如何被编译的.要添加一个新的引擎 ...
- 找不到可安装的ISAM
转载:http://www.cnblogs.com/zyc2/archive/2005/06/28/182492.html 读取excel数据 到 datagrid 出现:找不到可安装的ISAM ...
- 解决c#处理excel时故障 找不到可安装的 isam
直接拷贝的以前代码,但因软件版本,系统环境的变化,导致提示“找不到可安装的 isam”. 我目前新的软件环境:win8.1+office2010+vs2013 解决办法是修改连接字符串: 处理exce ...
- MySQL引擎介绍ISAM,MyISAM,HEAP,InnoDB
MySQL数据库引擎取决于MySQL在安装的时候是如何被编译的.要添加一个新的引擎,就必须重新编译MYSQL. 在缺省情况下,MYSQL支持三个引擎:ISAM.MYISAM和HEAP.另外两种类型IN ...
- 读取excel数据 到 datagrid 出现 找不到可安装的ISAM
读取excel数据 到 datagrid 出现:找不到可安装的ISAM 错误: 实在没有办法了 就仔细的查看了 一下数据链接字符串: string strConn = "Prov ...
随机推荐
- Vue组件中引入jQuery
一.安装jQuery依赖 在使用jQuery之前,我们首先要通过以下命令来安装jQuery依赖: npm install jquery --save # 如果你更换了淘宝镜像,可以使用cnpm来安装, ...
- Linux修改/etc/profile配置错误command is not found自救方法
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
- Exception 异常 输出的各个方法的区别
try{ System.out.println(1/0); }catch(Exception e){ //System.out.println(e+""); //对象+字符串 = ...
- DockerDesktop简单安装和使用
一.在windows10下,安装DockerDesktop: 1.检查windows版本为企业版或专业版,并开启Hyper-v系统设置:电脑的控制面板->程序->启用或关闭Windows功 ...
- (转)用webbrowser做的网站登陆程序,如何获取cookie并且保存在程序中 (IE8有效) ,用途嘛,你懂的。
今天帮朋友做了个工具,用webbrowser做的,用户使用用户名密码登陆网站后,需要在后台下载和分析一些页面. 分析页面使用的是htmlparser .net版 里面唯一需要解决的问题是,登陆后的co ...
- 再读c++primer plus 003
1.如果函数返回一个结构而不是一个指向结构的引用,将把整个结构复制到一个临时位置,再将这个拷贝复制给dup.但在返回值为引用时,将直接复制给变量,其效率更高. 2.返回引用时最重要的一点是,应避免返回 ...
- 42.OC中instancetype与id的区别
区别: 在ARC(Auto Reference Count)环境下: instancetype用来在编译期确定实例的类型,而使用id的话,编译器不检查类型,运行时检查类型 在MRC(Manual Re ...
- Hadoop3集群搭建之——虚拟机安装
现在做的项目是个大数据报表系统,刚开始的时候,负责做Java方面的接口(项目前端为独立的Java web 系统,后端也是Java web的系统,前后端系统通过接口传输数据),后来领导觉得大家需要多元化 ...
- (8)What makes a good life? Lessons from the longest study on happiness
https://www.ted.com/talks/robert_waldinger_what_makes_a_good_life_lessons_from_the_longest_study_on_ ...
- (3)The critical role librarians play in the opioid crisis
https://www.ted.com/talks/chera_kowalski_the_critical_role_librarians_play_in_the_opioid_crisis 00:1 ...