I have figured out right conditional formatting. here sharing which worked.
ExcelAddress formatRangeAddress = new ExcelAddress(_StartPeriod + ":" + _EndPeriod);
var cond1 = ws.ConditionalFormatting.AddLessThan(formatRangeAddress);
cond1.Style.Font.Color.Color = CSMUtils.SetRGBColor(156, 0, 0);
cond1.Formula = "0";
formatRangeAddress = new ExcelAddress(_StartPeriod + ":" + _EndPeriod);
var cond2 = ws.ConditionalFormatting.AddGreaterThan(formatRangeAddress);
cond2.Style.Font.Color.Color = CSMUtils.SetRGBColor(0,97,0);
cond2.Formula = "0";
public static System.Drawing.Color SetRGBColor(int r, int g, int b)
{
return System.Drawing.Color.FromArgb(255, r, g, b);
}