Bug 58130 - Support icon-based and data bars conditional formatting
Summary: Support icon-based and data bars conditional formatting
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: 3.13-dev
Hardware: PC Linux
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Blocks: 58149
  Show dependency tree
Reported: 2015-07-12 15:24 UTC by Nick Burch
Modified: 2016-06-15 10:04 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Nick Burch 2015-07-12 15:24:45 UTC
Recent versions of Excel have added new kinds of Conditional Formatting, such as icon sets, colour gradients and data bars. These are supported in both .xlsx and .xls file formats, but only rendered on newer versions of Excel

It would be good if POI was able to read and write these, plus have then demonstrated in the ConditionalFormats example program
Comment 1 Nick Burch 2015-07-13 20:27:09 UTC
As of r1690813, it's now possible to read XLS and XLSX files with most of these conditional formats in without error, see the conditional formats, and to get back the type of the format rules.

Still to do - decoding the details of these rules, getters and setters for reading and altering them, methods to allow you to create them, and examples
Comment 2 Nick Burch 2015-07-20 04:52:27 UTC
As of r1691869, it's now possible to read and write DataBar, Icon Set and Colour Scale conditional formattings, for HSSF and XSSF, with examples.

Office 2010 extensions aren't supported (#58149), and nor are Filter CFs (#58150), see the respective entries for those future enhancements
Comment 3 Javen O'Neal 2015-09-10 08:37:28 UTC
For people curious how this was implemented, see related commits below:

r1690494 CF12 headers
r1690503 CFHeaderBase
r1690527 rearrange CFRuleRecord to CFRuleBase
r1690530 unit tests
r1690686 CFRule12
r1690783 CFRule12
r1690796 implementation and unit test
r1690803 implementation
r1690808 rearrange logic
r1690813 unit test

r1691100 Icon
r1691101 Icon
r1691111 Icon
r1691113 Icon
r1691472 more CF types
r1691479 Icon
r1691676 interface for two more CF types
r1691677 enum
r1691679 Icon
r1691787 Icon unit tests
r1691788 Icon unit tests
r1691789 Color Scale unit tests
r1691858 Thresholds
r1691859 Color Scale
r1691860 ColorScale support, unit tests
r1691864 rearrange logic to base class
r1691865 ColorScale color support
r1691866 ColorScale Formattings
r1691867 DataBar support
r1691868 DataBar support
r1691869 DataBar example and tests