我想填充其值为"失败"的单元格的背景颜色,我尝试了以下代码,但它不起作用。
ConditionalFormattingRule rule2 = sheetCF.createConditionalFormattingRule("COUNTIF($J$2:$J$11,J2)=Fail");
PatternFormatting fill2 = rule2.createPatternFormatting();
fill2.setFillBackgroundColor(IndexedColors.RED.index);
fill2.setFillPattern(PatternFormatting.SOLID_FOREGROUND);
CellRangeAddress[] regions2 = { CellRangeAddress.valueOf("J2:J10") };
sheetCF.addConditionalFormatting(regions2, rule2);
createconditionalformatting的公式是什么?