Excel data mismatch

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having a problem in reading the values from the excel sheet in ASP .Net.
I am using the following connection string to read values from rows from an
excel sheet into a dataset. One of the columns contains alpha-numeric values
i.e. ABCDE12345 When accessing the value of this cell it returns "" (empty
string).

I am using the following connection string:
string strConn="Provider=Microsoft.Jet.OLEDB.4.0;"+"Data
Source="+filepath+";"+"Extended Properties=Excel 8.0;";

I have tried adding combinations of the following also.
HDR=YES;IMEX=1;ImportMixedTypes=Text;

The exception I get after adding the above code with my above connection
string is "No installable ISAM".

Does anyone have experience with this problem?
 
I am using the following connection string:
string strConn="Provider=Microsoft.Jet.OLEDB.4.0;"+"Data
Source="+filepath+";"+"Extended Properties=Excel 8.0;";

I have tried adding combinations of the following also.
HDR=YES;IMEX=1;ImportMixedTypes=Text;

Extended properties need to be surround in quotes:

string strConn = "Provider=Microsoft.Jet.OleDB.4.0;" + "Data
"Source=" + filepath + ";" + "Extended Properties=\"Excel
8.0;HDR=YES;IMEX=1;ImportMixedTypes=Text \"";
 
Back
Top