CFCONTENT preserve leading 0's in excel

I am exporting data to an excel worksheet and i need to preserve the leading 0's in numeric data (all data should be strings in output), i added an apostrophe (') to teh output, but i shows up on the excel document

i need

0538264
to remain a string but what i am gettiing is
538264
or
'0538264

how can i specify that the output is to be a string, note i cannot use a template as teh fields are selected by teh user and i cannot guarantee which fileds will be selected.

TIA
LVL 25
James RodgersWeb Applications DeveloperAsked:
Who is Participating?
 
73SpyderConnect With a Mentor Commented:
Put a    in front of the variables name that has the leading zero

This should work for you
0
 
James RodgersWeb Applications DeveloperAuthor Commented:
was supposed to be a 250pt q


but what you said worked

thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.