We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Format Cell For percentage values

Hi there,

How can we format any cell to display percentage values via code? 

I mean

When i update cell value as 23, it will display %23

Thanks for further help 

3 Replies

MK Mohan Kumar Ramasamy Syncfusion Team March 18, 2016 01:17 PM UTC

Hi Tezcan,


Thank you for using Syncfusion products.


Query 1: “How can we format any cell to display percentage values via code?”


We have prepared a sample using “format” method and please refer to the below code example,


Sample: http://jsplayground.syncfusion.com/rvm2vwrh

Documentation link: http://help.syncfusion.com/js/api/ejspreadsheet#methods:xlformat-format


Code example:


function loadComplete() {

      this.XLFormat.format({ "type": "percentage" }, "D2:D7"); 

//arg1 - Object -To pass the which type format

//arg2- string – To pass the range.

}



Query 2: “When i update cell value as 23, it will display %23”


We considered this “Custom format support for cells with string” as an issue and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.


https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents


Regards,

Mohankumar R.



TC Tezcan Cirakoglu March 28, 2016 12:11 PM UTC

Thanks alot, first query solved my issue, localisation would be solved after than i hope :)


MK Mohan Kumar Ramasamy Syncfusion Team March 29, 2016 09:59 AM UTC

Hi Tezcan,


We are happy that the issue has been solved at your end. Please get back to us if you have any other query.


Regards,

Mohankumar R


Loader.
Live Chat Icon For mobile
Up arrow icon