问题
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;
It works fine when I used the same connection string without HDR parameter. But I need to upload the excel without headers.
回答1:
Could you show us the exact connection string with quotation marks? It should read:
Extended Properties="Excel 8.0;HDR=YES"
and full code would be something like:
ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strFileName & ";Extended Properties=""Excel 8.0;HDR=YES"";"
回答2:
<connectionStrings>
<add name="AsstMgmt" connectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=E:\FOLDER1\FOLDER2\XYZ.mdb; Persist Security Info=False;" providerName="System.Data.OleDb" />
</connectionStrings>
来源:https://stackoverflow.com/questions/5814898/oledb-connection-string-for-excel-files