View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Charlie Charlie is offline
external usenet poster
 
Posts: 703
Default Excel data types

Hi folks,

First, I'm not completly sure this is the correct group for posting this,
but I figure if anyone would know an answer, they'd probably be looking in
this group.

Anyway, I'm trying to import Excel data into a .NET dataset using c#.

I've created the connection string using the IMEX=1 extended property to
treat mixed columns as text. So, now the numbers in the mixed columns that
have leading zeros come in correctly (e.g. '0210' comes in as '0210' instead
of '210'), but the numbers without leading zeros don't return anything (e.g.
'2101' returns '' or a null value).

Does anyone know of a way to get columns of data such as this in correctly?
Everything I read (even the MS KB article related to this issue) state that
it will treat the mixed-type columns as text, but it doesn't seem to mention
this little quirk.

Thanks for your help,

Charlie