Excel Datatype Format Issue

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

Guest

Language: C
Excel Reading Method: ExecuteReade

I am currently running into a challenge reading excel data when datatype formats are different in the SAME column. It seems like datatype (in the OleDbDataReader schema) is set by the first data row and that causes a problem if any of the subsequent rows in that column holds a diffrent datatype
Exampl
Zi
------
2926
9474

First row is stored as text in excel and second is stored as numeric (result of client cut'n paste that carries over formatting on a cell that is previously defined as text). Looping through the content is giving 29267 for first row and DBNull for second row

Is there a way to read the second value with out getting a DBNull?

Thanks for help in advance

Tedd
 
Back
Top