Hello. I'm trying to read an Excel file using ADO, but am having problems b/c data in the same column is sometimes text, sometimes numeric, sometimes a date, sometimes null. It seems vb.net tries to type everything in a given column the same.
I'm wondering if I need to do a SELECT CASE statement and test the "type" of each element. Does anyone know of a way to do this.
For example, one column of data might be called "Description". In my code, through ADO I reference this as drv("Description").
It seems to me I should then test the case, and assigned the value to a properly typed variable. ie, if the value of that cell is a DATE, then I need to assign it to a variable typed as a date. Etc.
How would I set up a case statement like this? And am I on the right track?
Thanks much!
Paul
Enter your message below
Sign in or Join us (it's free).