Apply Conditional Formatting in Worksheet

Possible Usage Scenario

Aspose.Cells allows you to add all sorts of Conditional Formatting, e.g., Formula, Above Average, Color Scale, Data Bar, Icon Set, Top10, etc. It provides the FormatCondition class which has all the necessary methods to apply conditional formatting of your choice. Here is a list of a few Get methods.

Apply Conditional Formatting in Worksheet

The following sample code shows how to add a Cell Value conditional formatting to cells A1 and B2. Please see the output Excel file generated by the code and the following screenshot, which explain the effect of the code on the output Excel file. If you put a value greater than 100 in cells A2 and B2, the red fill color in cells A1 and B2 will disappear.

todo:image_alt_text

Sample Code