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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Thread ID:





76040 Aug 20,2008 01:20 PM UTC Aug 21,2008 10:12 AM UTC ASP.NET Web Forms (Classic) 3
Tags: XlsIO
Administrator [Syncfusion]
Asked On August 20, 2008 01:20 PM UTC

how can i use collection ConditionalFormats? I would like to set Conditional Formating (Color Scale from red to green) to one column (with numbers). How can i do that? Can somebody help me?

Yavanaarasi G [Syncfusion]
Replied On August 21, 2008 07:20 AM UTC

Hi Michal,

Thank you for your interest in Syncfusion products.

You can use collection of ConditionalFormats by using IConditionalFormats interface. If you want to change the color from red to green with the numbers you can set the condition like below:

sheet.Range["E1:E20"].CellStyle.ColorIndex = ExcelKnownColors.Red;

//Applying conditional formatting to "E1 to E20" for format type as CellValue( Between)

IConditionalFormats condition = sheet.Range["E1:E20"].ConditionalFormats;
IConditionalFormat condition1 = condition.AddCondition();

//Set the condition
condition1.FirstFormula = "10";
condition1.SecondFormula = "20";

//Setting format properties.
condition1.Operator = ExcelComparisonOperator.Between;
condition1.FormatType = ExcelCFType.CellValue;
condition1.BackColorRGB = Color.FromArgb(0, 100,0);

Here is the sample for your reference:

Also please refer our shipped browser sample that demonstrates how conditional formatting can be applied with Essential XlsIO.


Please try this and let me know if this helps.


Administrator [Syncfusion]
Replied On August 21, 2008 08:00 AM UTC

Thank you for you reply, but it isn't exactly type of formating which i would like. I'd like color SCALE from green to red. An exmaple is attached.



Yavanaarasi G [Syncfusion]
Replied On August 21, 2008 10:12 AM UTC

Hi Michal,

Thank you for providing the file.

Currently we do not provide support for this feature in our code library. Already we have logged a feature request [#3072] regarding this. It will be expected to be available in our next release. We will update you once the feature has been implemented.

Please let me know if you have any other concerns.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon