dbTalk Databases Forums  

Excel to SQL Server column format issues

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


Discuss Excel to SQL Server column format issues in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
markd@magenic.com
 
Posts: n/a

Default Excel to SQL Server column format issues - 12-13-2004 , 01:03 PM






Hello,

I need to import some data from Excel into SQL Server using DTS. I've
implemented the code from www.sqldts.com that imports a named range
from a worksheet, and it's working perfectly (thank God for
www.sqldts.com!).

However, there is one column in my range that contains both numbers and
characters. The destination column in my table is a VARCHAR. For some
reason the data pump I have set up can't handle both types of data; if
I manually format the column as a number, I get all the numbers but no
character. If I manually format the column as text, I get all the
characters but no numbers. I need both (they are account numbers). I
have yet to figure out how to get all the data from the column into my
table.

Does anyone know a way to configure the data pump so that it will
handle both character and numeric data from an Excel spreadsheet? Or,
if there is a way to format the column from an ActiveX task, that would
work as well. I do not have control over how the spreadsheets are
initially presented to me - that is, I can't mandate that the users
save the spreadsheets any particular way.

Thanks in advance!

Mark


Reply With Quote
  #2  
Old   
HWUK
 
Posts: n/a

Default RE: Excel to SQL Server column format issues - 12-15-2004 , 05:23 AM






Never known DTS to have a problem with spreadsheets before, NOT

Heres the reason -

http://www.sqldts.com/default.aspx?6,222,254,0,1

there is also a different way using OPENROWSET in a sql task that isn't
covered here but not sure how your currently importing and wether the
OPENROWSET works with named sets.


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.