This is a migrated thread and some comments may be shown as answers.

Cell Format

3 Answers 130 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Marc
Top achievements
Rank 1
Marc asked on 10 Mar 2017, 11:21 AM

I have a number 67.75, with the format mask "###,###,##0.00%". I would expect 67.75%, however I am getting 6775.00%

I have the mask because I need comma's for thousand separator, and always 2 decimal places with the percentage sign.

Why isn't this working?

3 Answers, 1 is accepted

Sort by
0
Marc
Top achievements
Rank 1
answered on 10 Mar 2017, 03:07 PM

I have changed my number to be a proper percentage, with the format mask "###,###,##0.00%"

I understand this means always show 2 decimal places and 1 integer number.

However percentages of 90.10% are being shown as 90.1%

0
Accepted
Tsvetina
Telerik team
answered on 13 Mar 2017, 03:31 PM
Hi Marc,

The problem with the percentage happens because the percentage sign is a special formatting symbol, as explained here. To escape it, you can prefix it with a double backslash. With this change applied, your format string works as expected and 90.10 is shown as "90.10%" which, if I understand correctly, is the needed result:
http://dojo.telerik.com/@tsveti/edoHo

Regards,
Tsvetina
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Marc
Top achievements
Rank 1
answered on 13 Mar 2017, 04:14 PM

Hi Tsvetina

Thank you! I must have missed that part of the documentation. Cheers!

Marc

Tags
Spreadsheet
Asked by
Marc
Top achievements
Rank 1
Answers by
Marc
Top achievements
Rank 1
Tsvetina
Telerik team
Share this question
or