dbTalk Databases Forums  

Importing excel spreadsheet

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Importing excel spreadsheet in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mohan
 
Posts: n/a

Default Importing excel spreadsheet - 05-17-2006 , 03:27 PM






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


Reply With Quote
  #2  
Old   
Ed Enstrom
 
Posts: n/a

Default Re: Importing excel spreadsheet - 05-17-2006 , 06:56 PM






Mohan wrote:
Quote:
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

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
upper-left hand corner. This is for display only and does not affect the data pump.


Reply With Quote
  #3  
Old   
Mohan
 
Posts: n/a

Default Re: Importing excel spreadsheet - 05-18-2006 , 08:49 AM



Thanks a lot. that did the trick


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.