all groups > sql server dts > may 2006 >
You're in the

sql server dts

group:

Importing excel spreadsheet


Importing excel spreadsheet Mohan
5/17/2006 1:27:46 PM
sql server dts: Hi,

I am importing an excel spreadsheet using dts into a table in sql
server. The problem is that one of the fields in the excel spreadsheet
consists of a number or comma delimited numbers. When i pull the data
from the excel spreadsheet it is passing null for the comma delimited
numbers. It works fine if i have only single numeric value.

i have tried to set the column as Text in excel, but to no effect.

sample data is as follows

A 10 ----> works fine
B 20 ----->works fine
C 6,10,7 -------> passes null instead of 6,10,7

I would appreciate any help is this matter.
thanks
Re: Importing excel spreadsheet Ed Enstrom
5/17/2006 7:56:57 PM
[quoted text, click to view]
I just replied to the same problem in another thread. Here it is again:

I had a similar problem. I used the Format Cells option to set them to Text, but they still would import without
leading zeroes or as nulls (when the cell had a non-numeric character in it). Evidently Excel was formating the display
as text but internally it still considered the cells to be numerics.

Try this:

Select the column that is importing wrong
In the toolbar, select Data, then Text to Columns
Step through the wizard until you come to the Data Type window.
If the type is listed as General, change it to Text.
Save the spreadsheet.

After the change, cells that have values that Excel thinks are numbers will display with a green triangle in the
Re: Importing excel spreadsheet Mohan
5/18/2006 6:49:31 AM
Thanks a lot. that did the trick
AddThis Social Bookmark Button