I have an Excel worksheet I want to read into a datatable - all is well except for one particular column in my Excel sheet. The column, \'ProductID\', is a mix of values lik
There are two ways to handle mixed datatypes & excel.
Method 1
Method 2
There is a "hack" that consists of appending "IMEX=1" to your connection string like so:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=myfile.xls;Extended Properties=Excel 8.0;IMEX=1
This will attempt to handle mixed Excel formats according to how it is set in your registry. This can be set locally by you, but for a server, this is probably not an option.