Oledb连接字符串用于Excel文件 [英] Oledb connection string for excel files
问题描述
这是我在加载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屋!