在EPPLUS中使用通配符进行条件格式化

我正在尝试将格式转换为包含“SUBTOTAL”单词的单元格,这是我的代码:

ExcelAddress _formatRangeAddress = new ExcelAddress(2,1,tam,40); string _statement = "$A2=\"SUBTOTAL \""; var _cond1 = hoja.ConditionalFormatting.AddExpression(_formatRangeAddress); _cond1.Style.Fill.PatternType = OfficeOpenXml.Style.ExcelFillStyle.Solid; _cond1.Style.Fill.BackgroundColor.Color = System.Drawing.Color.LightSalmon; _cond1.Style.Font.Color.Color = System.Drawing.Color.White; _cond1.Formula = _statement; 

如果单元格只包含这个单词,则工作正常,但是在所有情况下(除了1)单元格的值将是“SUBTOTAL” +更多文本。

所以我想知道是否可以使用通配符或类似SQL语句的东西。

谢谢。

 =ISNUMBER(FIND("SUBTOTAL ", $A2)) 

如果区分大小写

 =ISNUMBER(SEARCH("SUBTOTAL ", $A2)) 

如果不区分大小写。

如果没有find,函数Search和Find将返回search词首次出现的索引,即#VALUE!。 IsNumber决定,如果是数字或#VALUE!