Thanks for the response, Nick! I guess we'll have to roll our own...
On Wed, Feb 24, 2016 at 2:42 PM, Nick Burch <[email protected]> wrote: > On Wed, 24 Feb 2016, Blake Watson wrote: > >> So, there's lots of examples on how to write out conditional stuff to >> Excel files. >> > > If you look at the unit tests, you'll see quite a few examples of reading > conditional formatting too > > But I've got an Excel workbook with some conditional cells in it already, >> and I want to know how to format those cells. >> > > Ah. That's not reading, that's evaluating! The state isn't written in the > file, unlike with formulas, the application just has to calculate it on the > fly > > Do I have to go through all the conditions that might apply and do it that >> way? >> > > Yup! Sadly. You'll need to take account of priorites too, in case several > apply. > > I think that Vaadin might have some code to do some of this. I've been > unable to get in touch anyone from the project to ask about contributing it > back though[1] :( > > Ideally we would have code in POI that would evaluate it. We already have > code that can handle colours in data format strings (eg > "[red]#,###.##;[green]-#,###.##") and tell you what colour the cell would > be from that. That code would likely need to be generalised then > conditional formatting support added. There's a few TODOs in the code to > give an idea of the starting point. > > Nick > > [1] I've tried emailing the person listed in the Javadocs as being the > author of the vaadin conditional formatting stuff, but never got any sort > of reply > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- *Blake Watson* *PNMAC* Application Development Manager 5898 Condor Drive Moorpark, CA 93021 (805) 330.4911 x7742 [email protected] <[email protected]> www.PennyMacUSA.com <http://www.pennymacusa.com/>
