Tag: 弃用

在ApachePOI中使用什么来代替弃用的CellRangeAddress.valueOf

我想在该地区添加条件格式,但我在教程中看到的一种方法已被弃用。 用什么来代替它。 样品: ConditionalFormattingRule rule2 = sheetCF.createConditionalFormattingRule(ComparisonOperator.LT, "50"); PatternFormatting fill2 = rule2.createPatternFormatting(); fill2.setFillBackgroundColor(IndexedColors.GREEN.index); fill2.setFillPattern(PatternFormatting.SOLID_FOREGROUND); CellRangeAddress[] regions = { CellRangeAddress.valueOf("A1:A6") //DEPRECATED }; sheetCF.addConditionalFormatting(regions, rule);