Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem when programatically importing cell that contain numbers and text

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Problem when programatically importing cell that contain numbers and text

A discussion by Jamie Collins:
http://www.dicks-blog.com/archives/2...ed-data-types/

--
Regards,
Tom Ogilvy



"Trond Hindenes" wrote in message
om...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing Long Numbers as Text cells Steve Excel Discussion (Misc queries) 1 March 11th 10 03:20 PM
csv not importing numbers stored as text Jennifer Excel Discussion (Misc queries) 1 January 20th 10 07:58 PM
importing numbers as text barnabel Excel Discussion (Misc queries) 5 August 9th 07 09:34 PM
problem in importing text file! via135 Excel Discussion (Misc queries) 2 May 4th 07 06:37 AM
Text importing problem. Please Help! websrfr Excel Programming 1 December 30th 03 06:40 AM


All times are GMT +1. The time now is 04:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"