You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by ChrisHauser <ch...@yahoo.com> on 2007/04/04 17:49:09 UTC
How to get String result from a cell with a formula behind
Trying to retrieve the result of a cell where I have the following formula:
=SUBTOTAL(9,P4:P27)
I have tried the following methods:
HSSFCell.getNumericCellValue()
HSSFCell.getRichStringCellValue().getString() --> returns empty string ""
All these results do not match to what I have in my MSExcel spread sheet.
Any help is greatly appreciated.
Chris
--
View this message in context: http://www.nabble.com/How-to-get-String-result-from-a-cell-with-a-formula-behind-tf3526392.html#a9839101
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
RE: How to get String result from a cell with a formula behind
Posted by "Karr, David" <da...@wamu.net>.
I'm new at this also, but you should probably use the
"org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator" class from the
scratchpad jar.
> -----Original Message-----
> From: ChrisHauser [mailto:chris.hauser@yahoo.com]
> Sent: Wednesday, April 04, 2007 8:49 AM
> To: poi-user@jakarta.apache.org
> Subject: How to get String result from a cell with a formula behind
>
>
> Trying to retrieve the result of a cell where I have the
> following formula:
> =SUBTOTAL(9,P4:P27)
>
> I have tried the following methods:
> HSSFCell.getNumericCellValue()
> HSSFCell.getRichStringCellValue().getString() --> returns
> empty string ""
>
> All these results do not match to what I have in my MSExcel
> spread sheet.
>
> Any help is greatly appreciated.
>
> Chris
> --
> View this message in context:
> http://www.nabble.com/How-to-get-String-result-from-a-cell-wit
h-a-formula-behind-tf3526392.html#a9839101
> Sent from the POI - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> Mailing List: http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/