dbTalk Databases Forums  

Excel truncating leading zeros

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


Discuss Excel truncating leading zeros in the microsoft.public.sqlserver.dts forum.



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

Default Excel truncating leading zeros - 01-12-2005 , 11:48 AM






I am having trouble with this, and when I google the topic there aren't
any threads with solutions.
The field is postal code, and when I open the file in excel, it says
reads "the number in this cell is formatted as text". The
destination field in our table is nvarchar, and I formatted the excel
field as text so I don't know why it's not working. When it's
previewed in the DTS, there are already nulls so it's before sql
server gets it as far as I can tell. SSNs don't have this issue due to
the presence of dashes (I think)
Someone suggested the write a schema.ini file, but this is domething
I've never done, and I need more information. I couldn't find this
file and I am inexperienced in creating one from scratch.
Help please? tia!
Moe


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

Default Re: Excel truncating leading zeros - 01-12-2005 , 12:07 PM






Never used schema.ini files, but if this is a one off export, you can
manually alter the field properties within Excel.

Unfortunately, sometimes Excel applies so much "common sense" to its
formatting that the original value cannot be retrieved.

hope this helps.


mo wrote:
Quote:
I am having trouble with this, and when I google the topic there aren't
any threads with solutions.
The field is postal code, and when I open the file in excel, it says
reads "the number in this cell is formatted as text". The
destination field in our table is nvarchar, and I formatted the excel
field as text so I don't know why it's not working. When it's
previewed in the DTS, there are already nulls so it's before sql
server gets it as far as I can tell. SSNs don't have this issue due to
the presence of dashes (I think)
Someone suggested the write a schema.ini file, but this is domething
I've never done, and I need more information. I couldn't find this
file and I am inexperienced in creating one from scratch.
Help please? tia!
Moe


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 - 2013, Jelsoft Enterprises Ltd.