B
Bill
I've been reading excel worksheets into a dataset using the following
prose
OleDbDataAdapter myCommand =
new OleDbDataAdapter(
"SELECT * FROM [MySheet$]",
@"Provider=Microsoft.Jet.OLEDB.4.0;" +
@"Data Source=" + input_file +
@";Extended Properties=""Excel 8.0;IMEX=1""");
The problem of course is the types for the columns are getting hosed
because of the mixed values. I know about the eight rows, etc, but I
have to wonder if there is anyway to force the issue regarding column
types so that the OLEDB reader won't load nulls. Seems kind of silly
to have it guess. Also the doc alludes to MAXSCANROWS=0 to scan all
the rows but that didn't seem to help.
Any ideas?
Bill
prose
OleDbDataAdapter myCommand =
new OleDbDataAdapter(
"SELECT * FROM [MySheet$]",
@"Provider=Microsoft.Jet.OLEDB.4.0;" +
@"Data Source=" + input_file +
@";Extended Properties=""Excel 8.0;IMEX=1""");
The problem of course is the types for the columns are getting hosed
because of the mixed values. I know about the eight rows, etc, but I
have to wonder if there is anyway to force the issue regarding column
types so that the OLEDB reader won't load nulls. Seems kind of silly
to have it guess. Also the doc alludes to MAXSCANROWS=0 to scan all
the rows but that didn't seem to help.
Any ideas?
Bill