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.
Unfortunately, activation email could not send to your email. Please try again.

Setting Percentage NumberFormat in formula cell

Thread ID:





69227 Oct 18,2007 09:34 PM Oct 26,2007 04:47 AM ASP.NET Web Forms (Classic) 1
Tags: XlsIO
Kjell Alinge
Asked On October 18, 2007 09:34 PM

How do you set the NumberFormat of a cell to percentage when the cell contains a formula?

I tried the following but it the cell style is not changed:

worksheet.Range["A1"].Number = 10.92;
worksheet.Range["B1"].Number = 20.67;
worksheet.Range["C1"].Formula = "A1/B1";
worksheet.Range["C1"].NumberFormat = "0.00%";

C1 displays "0.5283018", but it should display "52.83%".

Melba Winshia [Syncfusion]
Replied On October 26, 2007 04:47 AM

Hi Kjell,

I am afraid that I was not able to reproduce the issue. I tested the issue with your code snippets under below system configuration:

Microsoft Windows XP
Version 2002
Service Pack 2

OS language - English
Regional Options - English(United States)
Essential Studio version -

Here is the video clip your reference:


Please take a look at the above video clip and let me know if I am missing something and also let me know if there are any configuration changes, so that I can test in that environment and sort out the cause of the issue and provide you a solution.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.