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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
azmeerrehan
Partner - Creator
Partner - Creator

Export To CSV

I have Employee ID  like '0012345677' , it has leading zeroes in it.  When I export it to Excel its fine but exporting as a CSV looses the leading 0's.  I need the leading 0's when exporting to CSV.  (QV 12))

Have already tried num(exployee ID, '0000000000')

Any suggestions

6 Replies
olivierrobin
Specialist III
Specialist III

hello

and what about using text() function ?

azmeerrehan
Partner - Creator
Partner - Creator
Author

how does Txt function work

olivierrobin
Specialist III
Specialist III

Text() forces the expression to be treated as text, even if a numeric interpretation is possible.

Text (expr)

azmeerrehan
Partner - Creator
Partner - Creator
Author

Doesnt work, still dropping out the leading 0's

Frank_Hartmann
Master II
Master II

this link might be helpful:

Keeping Leading Zero in Export

olivierrobin
Specialist III
Specialist III

try this

text(num(your column,'0000000'))

adjust the format according to your needs