Prefixing The Zero's In CSV File Column.
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
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.
![Wink :wink:](./images/smilies/icon_wink.gif)
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
"You can never have too many knives" -- Logan Nine Fingers