Re: Reading (not writing) conditional states: possible?

2016-07-15 Thread Javen O'Neal
Blake,

Would you be willing to contribute an example of using Apache POI in
Clojure?

We already have Jython and Scala on
https://poi.apache.org/poi-jvm-languages.html

On Feb 24, 2016 3:17 PM, "Blake Watson"  wrote:

Well, it'll be in Clojure, so... =)

On Wed, Feb 24, 2016 at 2:58 PM, Nick Burch  wrote:

> On Wed, 24 Feb 2016, Blake Watson wrote:
>
>> Thanks for the response, Nick!
>>
>> I guess we'll have to roll our own...
>>
>
> And contribute it back? ;-)
>
> Nick
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@poi.apache.org
> For additional commands, e-mail: user-h...@poi.apache.org
>
>


--

*Blake Watson*

*PNMAC*
Application Development Manager
5898 Condor Drive
Moorpark, CA 93021
(805) 330.4911 x7742
blake.wat...@pnmac.com 
www.PennyMacUSA.com 


Re: Reading (not writing) conditional states: possible?

2016-02-24 Thread Blake Watson
Well, it'll be in Clojure, so... =)

On Wed, Feb 24, 2016 at 2:58 PM, Nick Burch  wrote:

> On Wed, 24 Feb 2016, Blake Watson wrote:
>
>> Thanks for the response, Nick!
>>
>> I guess we'll have to roll our own...
>>
>
> And contribute it back? ;-)
>
> Nick
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@poi.apache.org
> For additional commands, e-mail: user-h...@poi.apache.org
>
>


-- 

*Blake Watson*

*PNMAC*
Application Development Manager
5898 Condor Drive
Moorpark, CA 93021
(805) 330.4911 x7742
blake.wat...@pnmac.com 
www.PennyMacUSA.com 


Re: Reading (not writing) conditional states: possible?

2016-02-24 Thread Nick Burch

On Wed, 24 Feb 2016, Blake Watson wrote:

Thanks for the response, Nick!

I guess we'll have to roll our own...


And contribute it back? ;-)

Nick

-
To unsubscribe, e-mail: user-unsubscr...@poi.apache.org
For additional commands, e-mail: user-h...@poi.apache.org



Re: Reading (not writing) conditional states: possible?

2016-02-24 Thread Blake Watson
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  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: user-unsubscr...@poi.apache.org
> For additional commands, e-mail: user-h...@poi.apache.org
>
>


-- 

*Blake Watson*

*PNMAC*
Application Development Manager
5898 Condor Drive
Moorpark, CA 93021
(805) 330.4911 x7742
blake.wat...@pnmac.com 
www.PennyMacUSA.com 


Re: Reading (not writing) conditional states: possible?

2016-02-24 Thread Nick Burch

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: user-unsubscr...@poi.apache.org
For additional commands, e-mail: user-h...@poi.apache.org



Reading (not writing) conditional states: possible?

2016-02-24 Thread Blake Watson
So, there's lots of examples on how to write out conditional stuff to Excel
files.

But I've got an Excel workbook with some conditional cells in it already,
and I want to know how to format those cells. Simple example:

==> Cell A1, otherwise unformatted, turns purple if its contents are
greater than 0.

If I read A1's style, I'll get the plain format. Now, I put  "100" into A1.
This doesn't change the cell style. If I evaluate A1, that still doesn't
change the style.

Do I have to go through all the conditions that might apply and do it that
way? IOW, POI doesn't directly/automatically support conditional formatting
triggered by changes made to an XSSFCell?

-- 

*Blake Watson*

*PNMAC*
Application Development Manager
5898 Condor Drive
Moorpark, CA 93021
(805) 330.4911 x7742
blake.wat...@pnmac.com 
www.PennyMacUSA.com