Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Importing Long Numbers as Text cells | Excel Discussion (Misc queries) | |||
csv not importing numbers stored as text | Excel Discussion (Misc queries) | |||
importing numbers as text | Excel Discussion (Misc queries) | |||
problem in importing text file! | Excel Discussion (Misc queries) | |||
Text importing problem. Please Help! | Excel Programming |