Hi, I am currently trying to create an Excel file with conditional handling. In order to achieve my purpose, I started creating a piece of code, that reads an existing Excel file and prints out what it finds. My code writes, in particular:
CellRange: org.apache.poi.ss.util.CellRangeAddress [D4:O32] formula1 = AND($B1<=A$3,$C1>=A$3) formula2 = null comparisonOperation = 0 conditionType = 2 As a next step I wrote a piece of code, which creates a sheet with a conditional format by invoking HSSFSheetConditionalFormatting.createConditionalFormattingRule(String) passing the argument "AND($B1<=A$3,$C1>=A$3)". When I inspect the created Excel file, then I notice an important difference to my original file: - The file created with POI shows the formula "AND($B1<=A$3,$C1>=A$3)" for any cell. - The original file adjusts the formula, depending on the cell. For example, it shows "AND($B4<=D$3,$C4>=D$3)" in cell "D4". Any ideas what I might be doing wrong? Thanks in advance, Jochen -- I Am What I Am And That's All What I Yam (Popeye) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
