Apply Conditional Formatting in Worksheet
Contents
[
Hide
]
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 IFormatCondition class which has all the necessary methods to apply conditional formatting of your choice. Here is the list of a few of Get methods.
Apply Conditional Formatting in Worksheet
The following sample code shows how to add a Cell Value conditional formatting on cells A1 and B2. Please see the output excel file generated by the code and the following screenshot which explains the effect of the code on the output excel file. If you will put some value greater than 100 in cell A2 and B2, the Red fill color from cell A1 and B2 will disappear.