Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
peacekas99
Contributor III
Contributor III

Add leading zero's to .csv

Hi guys,
 
I have a job reading from database input and writing to .csv file. I'm loosing zeroes from my number using .csv.
For example: "0078 becomes 78" or "0587 becomes 587".
My datatype is strong.
How can I keep my leading zero's?
Thanks.
Labels (3)
1 Solution

Accepted Solutions
manodwhb
Champion II
Champion II

@peacekas99, when your oven in notepad++ are you able to see leading zeros from that csv when you populated as a string? from excel you could not able to find  until you format that column

View solution in original post

6 Replies
manodwhb
Champion II
Champion II

I believe in so rec side is string data type and when writing it CSV using tfileoutputdelimitted also you should have string data type and you open file in notepad++ and you will see the leading zeros.
peacekas99
Contributor III
Contributor III
Author

I tried string too. The client wants to receive in .csv so is there a way in Talend to fix this issue of missing leading 0’s?
manodwhb
Champion II
Champion II

@peacekas99, when your oven in notepad++ are you able to see leading zeros from that csv when you populated as a string? from excel you could not able to find  until you format that column

peacekas99
Contributor III
Contributor III
Author

Yes when I open with notepad+ I see leading zeros. But how can I make that possible with Talend studio job when writing results to .csv file? Is that possible?

Thanks.
manodwhb
Champion II
Champion II

@peacekas99 ,which means you have in your CSV file but when open in excel is will not show until you format it, it is the behavior of excel software. It is not Talend software issue.

peacekas99
Contributor III
Contributor III
Author

Oh ok I thought you can use Talend to fix that issue. Thanks