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?

conditional formatting example

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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -