Problem when programatically importing cell that contain numbers and text

T

Trond Hindenes

Hello all,

I am experiencing a strange problem when trying to import data from an
Excel file using vb.net (using the OLE DB provider):

I have a column that in some cases store a number, f.ex. '789' and in
some cases a combination of numbers and letters, f.ex 'T33'.

It seems that when importing, either using the import function in SQL
Server or the JET OLE DB provider, this doesn't work (or maybe its
me...)

Whenever the majority (it seems) of the rows has only a number in that
column, the numerical values are imported, and the text values are
just xeroed out. ALso, when I use textual values for most of the rows
and a few numerical values, it is the numerical ones that are zeroed
out and not imported.

As far as I can see, the JET engine tries to determine the datatype in
each column, and has a hard time determening when there are
combinations of numbers and letters.

Has anyone else experienced this? Any workaround?

Best regards,
Trond Hindenes
Norway
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top