Bug 65266

Summary: Reading conditional formatting not working when format references another sheet
Product: POI Reporter: edu <edu00085>
Component: XSSFAssignee: POI Developers List <dev>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 5.0.0-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X 10.1   
Attachments: Testcase and excel files

Description edu 2021-04-26 08:18:54 UTC
Created attachment 37824 [details]
Testcase and excel files

reading the number of conditional formatting via getNumConditionalFormattings
is only working if the condition references cells in the same sheet.

Attached two simple Excel files and a simple testcase:

If you run it with "conditional_formatting_issue.xlsx", you see this ouput:

Tabelle1 has 0 conditional formattings
MyData has 0 conditional formattings

here you see that conditional formattings were not correctly read, although
there is one (referencing another sheet).

If the conditional formatting references same sheet (
conditional_formatting_issue_ok.xlsx), I get the output:

Tabelle1 has 1 conditional formattings

which shows that in this case it works.

I tested both with POI 4.1.2 and POI 5.0.0