Bug 65266 - Reading conditional formatting not working when format references another sheet
Summary: Reading conditional formatting not working when format references another sheet
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 5.0.0-FINAL
Hardware: PC Mac OS X 10.1
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-26 08:18 UTC by edu
Modified: 2021-04-26 08:18 UTC (History)
0 users



Attachments
Testcase and excel files (13.91 KB, application/zip)
2021-04-26 08:18 UTC, edu
Details

Note You need to log in before you can comment on or make changes to this bug.
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