How to tell c# OleDb driver for excel to always read as text?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • justduick
    New Member
    • Jul 2008
    • 5

    How to tell c# OleDb driver for excel to always read as text?

    I am using the Microsoft.Jet.O LEDB.4.0 provider to read from an excel doc into my visual studio c# application... I know that using the property IMEX=1 will cause the reader to always read "intermixed " types as text. However, it appears that if the first cell in the column is a number and later cells are text, even with this property all cells are not interpreted as text. So does anyone know if in this situation there is a way to tell the provider to read all cells, no matter what, as text?

    thanks.
  • justduick
    New Member
    • Jul 2008
    • 5

    #2
    is there really no way to do this?

    for a work around is there a way to automatically insert a row of "a"s right below my header row so that automatically every column will be considered text and I won't have to worry about intermixed columns?

    i'm surprised one seems to have had this issue.

    thanks.

    Comment

    Working...