You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Blake Watson <bl...@pnmac.com> on 2014/11/06 00:52:57 UTC

Cell type as returned by formula?

Is there a way to ascertain what data type a formula will return? If you
invoke getCellType, you just get "formula".

-- 

*Blake Watson*

*PNMAC*
Application Development Manager
5898 Condor Drive
Moorpark, CA 93021
(805) 330.4911 x7742
blake.watson@pnmac.com <me...@pnmac.com>
www.PennyMacUSA.com <http://www.pennymacusa.com/>

Re: Cell type as returned by formula?

Posted by Blake Watson <bl...@pnmac.com>.
Thanks, Nick!

On Wed, Nov 5, 2014 at 4:05 PM, Nick Burch <ap...@gagravarr.org> wrote:

> On Wed, 5 Nov 2014, Blake Watson wrote:
>
>> Is there a way to ascertain what data type a formula will return? If you
>> invoke getCellType, you just get "formula".
>>
>
> If you need to be certain, you'll need to evaluate it, and check the result
>
> If "what Excel last calculated this to be" is good enough, try
> https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/Cell.html#
> getCachedFormulaResultType%28%29
>
> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>


-- 

*Blake Watson*

*PNMAC*
Application Development Manager
5898 Condor Drive
Moorpark, CA 93021
(805) 330.4911 x7742
blake.watson@pnmac.com <me...@pnmac.com>
www.PennyMacUSA.com <http://www.pennymacusa.com/>

Re: Cell type as returned by formula?

Posted by Blake Watson <bl...@pnmac.com>.
Thanks!

On Wed, Nov 5, 2014 at 4:05 PM, Nick Burch <ap...@gagravarr.org> wrote:

> On Wed, 5 Nov 2014, Blake Watson wrote:
>
>> Is there a way to ascertain what data type a formula will return? If you
>> invoke getCellType, you just get "formula".
>>
>
> If you need to be certain, you'll need to evaluate it, and check the result
>
> If "what Excel last calculated this to be" is good enough, try
> https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/Cell.html#
> getCachedFormulaResultType%28%29
>
> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>


-- 

*Blake Watson*

*PNMAC*
Application Development Manager
5898 Condor Drive
Moorpark, CA 93021
(805) 330.4911 x7742
blake.watson@pnmac.com <me...@pnmac.com>
www.PennyMacUSA.com <http://www.pennymacusa.com/>

Re: Cell type as returned by formula?

Posted by Nick Burch <ap...@gagravarr.org>.
On Wed, 5 Nov 2014, Blake Watson wrote:
> Is there a way to ascertain what data type a formula will return? If you 
> invoke getCellType, you just get "formula".

If you need to be certain, you'll need to evaluate it, and check the 
result

If "what Excel last calculated this to be" is good enough, try
https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/Cell.html#getCachedFormulaResultType%28%29

Nick

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