excel - Apache POI - Generating conditional formatting that refers to other cells -
i'm generating xssf spreadsheet in java using apache poi. i'm trying generate conditional formatting formula that's similar "if value in cell $a2="x", turn $c2 green", , apply way down column c.
i haven't seen examples of online, though—all examples seen deal 1 column @ time, not references. possible do?
the conditional formatting rule want apply like:
sheetconditionalformatting scf = sheet.getsheetconditionalformatting(); conditionalformattingrule cfr1 = scf.createconditionalformattingrule("(indirect(address(row(), column() - 1))) = \"cds correct\"");
the formula finds whatever value of cell 2 left of current cell. can use cellrangeaddress appropriate number of rows in c column have populated.
Comments
Post a Comment