Documents for Excel, .NET Edition Documentation
Templates / Template Configuration / Conditional Formatting
In This Topic
    Conditional Formatting
    In This Topic

    Conditional formatting rules can be defined in Template layout which are applied to the expanded cells in Excel report.

    For example, the below template layout applies a conditional formatting rule in data field: {{ds.Revenue}}. The rule specifies to show the cell value in red if it is less than or equal to 500000 and in green if it is equal to or greater than 100000. Also, the icons are displayed alongside cell values.

     

    When the template is processed, the conditional formatting rule is applied to the expanded data in the final Excel report as shown below: 

     

    Limitation

    If the formula reference in a conditional formatting rule refers to a template cell, it is not handled correctly by GcExcel Template. The formula is not adjusted after template processing, that is, the formula will remain the same and will not get updated dynamically with the range.

    For example:

    If cell B5 has a formula reference in conditional formatting rule "=$A$5 > 100".  And both A5 and B5 are template cells then after the template processing, conditional formatting rule may be applied from B5:B10 but, it  "=$A$5 > 100" will not change dynamically with the cell range.