https://bz.apache.org/bugzilla/show_bug.cgi?id=68779
Bug ID: 68779 Summary: Mixed cell reference is being malformatted Product: POI Version: 5.2.3-FINAL Hardware: PC Status: NEW Severity: critical Priority: P2 Component: XSSF Assignee: dev@poi.apache.org Reporter: baha.merzou...@bertschinnovation.com Target Milestone: --- When creating a conditional formatting rule using formula String such as: ISNUMBER(SEARCH(ADDRESS(MATCH($C1,INDIRECT(HLOOKUP($B1,CategoryLookup,4,0)),0)+1,COLUMN(INDIRECT(HLOOKUP($B1,CategoryLookup,4,0))),4),$ref.E$1)) ------------------------------Code snippet------------------------------ SheetConditionalFormatting sheetCF = sheet.getSheetConditionalFormatting(); ConditionalFormattingRule rule = sheetCF.createConditionalFormattingRule( "ISNUMBER(SEARCH(ADDRESS(MATCH($C1,INDIRECT(HLOOKUP($B1,CategoryLookup,4,0)),0)+1,COLUMN(INDIRECT(HLOOKUP($B1,CategoryLookup,4,0))),4),$ref.E$1))"); PatternFormatting fill = rule.createPatternFormatting(); fill.setFillBackgroundColor( IndexedColors.YELLOW.index); fill.setFillPattern( PatternFormatting.SOLID_FOREGROUND); ConditionalFormattingRule[] cfRules = new ConditionalFormattingRule[] { rule }; CellRangeAddress[] regions = new CellRangeAddress[] { CellRangeAddress.valueOf( "D1:L10000") }; sheetCF.addConditionalFormatting( regions, cfRules); ---------------------------------------------------------------------- The formatting rule from the generated xslx file is written as follow: ISNUMBER(SEARCH(ADDRESS(MATCH($C1,INDIRECT(HLOOKUP($B1,CategoryLookup,4,0)),0)+1,COLUMN(INDIRECT(HLOOKUP($B1,CategoryLookup,4,0))),4),$ref.e$1)) The problem seems to be reproducible with every mixed cell referencing; in this example $ref.e$1 , I attempted the other way around $ref.$E1 fixed column changing row same problem. The fact that the Alpha index of the cell is lower cased is breaking it. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org