Oledb连接字符串用于Excel文件 [英] Oledb connection string for excel files

查看:175
本文介绍了Oledb连接字符串用于Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我在加载excel 2003文件时使用的oledb连接字符串。但是我收到的错误找不到可安装的ISAM'。请帮我解决这个问题。我在这里做错了。

This is the oledb connection string I'm using while loading excel 2003 files. But I'm getting the error could not find installable ISAM`.' Please help me in this issue. What I'm doing wrong here.

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\FileUploadV2\FlatFile
\Book2-17.xls;Extended Properties=Excel 8.0;HDR=NO;

当我使用没有HDR参数的相同连接字符串时,它工作正常。但是我需要上传没有标题的excel。

It works fine when I used the same connection string without HDR parameter. But I need to upload the excel without headers.

推荐答案

你能用引号给我们确切的连接字符串吗?它应该是:

Could you show us the exact connection string with quotation marks? It should read:

扩展属性=Excel 8.0; HDR = YES

和完整的代码将是这样的:

and full code would be something like:

ConnString =Provider = Microsoft.Jet.OLEDB.4.0;数据源=& strFileName& ;扩展属性=Excel 8.0; HDR = YES;

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

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