Coast Line
asked on
keeping just one decimal after a dot
Hi Actually I am Exporting data to Excel and i need to show the data as 105.2% while in excel it shows as 105.20%, The percentage sign i am adding manually, how can i remove the last zero from the data i tried using numberformat in Cf page but no workaround, please guide
thanks
thanks
ASKER
i have excel 2007,
in excel 2007 you should have the same command, if you have the standard view you just have in the 2nd line, where you can select your font a bit right something that look like this
<-.0
.00
and
'00
->0
with that buttons you can raise and lower the decimals
<-.0
.00
and
'00
->0
with that buttons you can raise and lower the decimals
ASKER
i am exporting from coldfusion to excel, i am not working wwithin excel
Can you show the line of coldfusion code you're using to write this value, I can help you modify it..
ASKER
i am just using as #mydata# inside the <cfsavecontent>
and then i am am writing this in excel.
on my screen it appears as 0.0% or 154.1%
in excel i want the format to same, but i am not getting it, just guide
You are seeing the 'default formatting' in Excel (and Libreoffice). If you type 154.1% into a cell in Excel and press enter, it will convert it to 154.10%. Unless you can find a way to change the default formatting, you can't change that.
ASKER
Then Guide me how to fix it
I don't believe you can fix it outside of Excel. CSV and HTML imports are subject to the default formatting rules and those rules can't be changed outside the program. You can't even force it to be text without adding a letter to it.
ASKER
still there might we give it a try using some removechars or listlast or right function, well just a thought actually i tried it but may be i was doing wrong way
Any CSS implementation
Any CSS implementation
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
You're welcome.
for excel 2010 and i think in other versions it should be similar you just have to right click on the cell -> formating -> numbers -> choose percentage -> on the right you can click and choose the digits e.g 1.
hope it helped