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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ConditionalFormats

Thread ID:

Created:

Updated:

Platform:

Replies:

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

Hi,
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:


[C#]
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:
http://www.syncfusion.com/development/uploads/XlsIO_ConditionalFormatting_be69897b.zip

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

\Syncfusion\EssentialStudio\6.3.0.30\Windows\XlsIO.Windows\Samples\2.0\Formatting\ConditionalFormatting\CS

Please try this and let me know if this helps.

Regards,
G.Yavana


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.

Thanks,
Michal



Book1_923b2467.zip

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.

Regards,
G.Yavana


CONFIRMATION

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.

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

;