I added example code and output per Nick's suggestion. I didn't do anything fancy in terms of converting things like color indexes to text names or RGB values, but it does show how to evaluate which rules apply to a given cell, and having multiple rules apply, with possibly conflicting/overriding formatting.
http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/ss/examples/ConditionalFormats.java On Thu, Apr 20, 2017 at 9:53 AM Greg Woolsey <[email protected]> wrote: > Hadn't seen those example files. I'll think about what an example might > look like. I'm sure it would be useful to someone. > > On Wed, Apr 19, 2017 at 10:46 PM Nick Burch <[email protected]> wrote: > >> On Wed, 19 Apr 2017, Greg Woolsey wrote: >> > Missed the 2nd half of the question. This class only returns rules that >> > match the current state of the workbook for a given cell - rules that >> > would be applied were it open in Excel. Note that this logic is limited >> > to evaluating functions actually implemented in POI, which is most of >> > them, but there are some exceptions and a few open bugs. >> >> Is it worth adding this as another demo method to >> src/examples/src/org/apache/poi/ss/examples/ConditionalFormats.java ? >> >> Nick >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >>
