Avatar of lulu50
lulu50
Flag for United States of America asked on

Having an issue with NumberFormat

Hi,

I'm not sure what I'm doing wrong with NumberFormat.

I have a button that export the data to an excel document.
For example:

The field in the database is stored like this 110058100003
but when I export it to excel it is displayed as 110,058,100,003

#NumberFormat(PRPR_ID)#

If I don't use NumberFormat the data in the excel document will be displayed like this
1.10058E+11

Open in new window


all I want is to display my field like it is in the database : 110058100003

Thank you for your help
Lulu
ColdFusion Language

Avatar of undefined
Last Comment
lulu50

8/22/2022 - Mon
Subodh Tiwari (Neeraj)

Use the Text Format instead.
Michael Dyer

If you put the number in quotes when you export it, like this "110058100003", it will open in Excel as text and you will see the whole number.
lulu50

ASKER
Michael,

If I do this
<cfoutput>'#PRPR_ID#'</cfoutput>

the output is this:
'110058100003'

but what I want is this:
110058100003

sktneer,

I don't know how to do it. (Text Format )
Can you please give me an example

Thanks,
Lulu
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
lulu50

ASKER
If I do this:

<cfoutput>#ToString(PRPR_ID)#</cfoutput>

the output I get is this:
1.10058E+11
ASKER CERTIFIED SOLUTION
Ryan Chong

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
lulu50

ASKER
Ryan,

Thank you it works now!!!

this is what I used:

style="mso-number-format:000;"

Thanks,
Lulu
lulu50

ASKER
Thank you
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.