You're creating the template here, which does not have access to the values in a cell.
To my knowledge, the Excel exporter does not support conditional formatting based on the value of a cell. You'd need to implement this in Java yourself. Based on a quick search, I think you'd use methods from this class:
https://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFConditionalFormatting.html