Prefixing The Zero's In CSV File Column.

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Try forcing the format of the columns in Excel to be "Text".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As you noted, this has nothing to do with DataStage or ftp and is what Excel does when it sees something that it "knows" is a number, it will convert it including removing any leading zeroes since they're just icky and get in the way. :wink:

There's lots of information out there on how to stop it, I know because I've ask the same question of the Internet gods myself in the past. And what you are doing is one of the ways to force Excel to treat the field as text and thus retain the zeroes.

Another is to use an extension other than csv without otherwise changing the file. It can then be imported into Excel (rather the automatically opened by it) and during the import process the User can indicate the field is to be treated as text.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kondeti
Premium Member
Premium Member
Posts: 67
Joined: Sat Mar 04, 2006 11:38 am

Post by kondeti »

Ray/Chulett

Thank you so much for sharing this information.
Post Reply