Hi,
I am trying to generate excel file in data stage.
In doing so i have a problem, When i am trying to append leading Zeros to a filed and witting into excel file all the leading zeros are stripped off.
Can some one help ma in solving this.
Thanks in advance.
Appending leading Zeros and writting to excel file
Moderators: chulett, rschirm, roy
Re: Appending leading Zeros and writting to excel file
Hi,neo637 wrote:Hi,
I am trying to generate excel file in data stage.
In doing so i have a problem, When i am trying to append leading Zeros to a filed and witting into excel file all the leading zeros are stripped off.
Can some one help ma in solving this.
Thanks in advance.
You can try using quotes for the fields so that the leading zeros are preserved in the output.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
This is a common problem for anyone creating 'Excel' files which a search here or a quick Google would turn up... and one not easily solved. Without a pre-formatted target and the GUI, Excel will always convert anything that looks like a number to a number during an import and remove any non-significant things like leading zeroes.
For csv files, the 'trick' is to create the files as .txt files and teach the user how to force the import to use Text for the field(s) in question to preserve any leading zeroes.
http://excel.tips.net/Pages/T002588_Han ... Files.html
For csv files, the 'trick' is to create the files as .txt files and teach the user how to force the import to use Text for the field(s) in question to preserve any leading zeroes.
http://excel.tips.net/Pages/T002588_Han ... Files.html
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers