Can I have  sample code where and how you are using If statements.

Thanks & Regards,
________________________________

Sunil Kumar Dhage

-----Original Message-----
From: rlaudien [mailto:[EMAIL PROTECTED]
Sent: Monday, November 20, 2006 1:33 PM
To: poi-user@jakarta.apache.org
Subject: IF-function

Hello,



We are trying to execute if-functions within MS-Excel via HSSF and it
does
not work. By searching the mailing list, we found Sumit's email (see
below),
showing that he was able to execute normal IF functions. Does anybody
know
how to do it? We work with:



- poi-scratchpad-3.0-alpha2-20061017.jar

- poi-3.0-alpha2-20061017.jar

- poi-contrib-3.0-alpha2-20061017.jar



Best regards, Rainer



.

evaluator.setCurrentRow(tmpRow);

HSSFFormulaEvaluator.CellValue cellValue = evaluator.evaluate(tmpCell);
//contains if-function

cell.setCellValue(cellValue.getNumberValue()); //returns 0.00 instead of
the
if-function result

.




Message view


<http://mail-archives.apache.org/mod_mbox/jakarta-poi-user/200604.mbox/%
3c28
[EMAIL PROTECTED]> <
<http://mail-archives.apache.org/mod_mbox/jakarta-poi-user/200604.mbox/d
ate>
Date
<http://mail-archives.apache.org/mod_mbox/jakarta-poi-user/200604.mbox/%
3c00
[EMAIL PROTECTED]> > .
<http://mail-archives.apache.org/mod_mbox/jakarta-poi-user/200604.mbox/%
3c28
[EMAIL PROTECTED]> <
<http://mail-archives.apache.org/mod_mbox/jakarta-poi-user/200604.mbox/t
hrea
d> Thread
<http://mail-archives.apache.org/mod_mbox/jakarta-poi-user/200604.mbox/%
3c00
[EMAIL PROTECTED]> >



<http://mail-archives.apache.org/mod_mbox/jakarta-poi-user/200604.mbox/%
3cOF
[EMAIL PROTECTED]
arch
ives#archives> Top


<http://mail-archives.apache.org/mod_mbox/jakarta-poi-user/200604.mbox/%
3c28
[EMAIL PROTECTED]> <
<http://mail-archives.apache.org/mod_mbox/jakarta-poi-user/200604.mbox/d
ate>
Date
<http://mail-archives.apache.org/mod_mbox/jakarta-poi-user/200604.mbox/%
3c00
[EMAIL PROTECTED]> > .
<http://mail-archives.apache.org/mod_mbox/jakarta-poi-user/200604.mbox/%
3c28
[EMAIL PROTECTED]> <
<http://mail-archives.apache.org/mod_mbox/jakarta-poi-user/200604.mbox/t
hrea
d> Thread
<http://mail-archives.apache.org/mod_mbox/jakarta-poi-user/200604.mbox/%
3c00
[EMAIL PROTECTED]> >


From

[EMAIL PROTECTED]


Subject

Issues with Formula in HSSF API


Date

Mon, 10 Apr 2006 20:25:36 GMT


I am facing issues writing IF statements using HSSF API (MS-Excel) .
Normal IF function works fine. But when I use Nested IF statements or
have
AND, OR or ROUND functions within an IF statement, it gives #VALUE.
Ms-Excel simply returns #VALUE code for those inner functions or inner
IF
statement.

I have tried ROUND function outside IF statement, and it works perfectly

fine.  But not inside an IF statement.

has anyone solved this issue ? pls let me know if there is a way out !
Its
urgent for me to resolve this..

Regards,
Sumit
+=========================================================+
This message may contain confidential and/or privileged
information.  If you are not the addressee or authorized to
receive this for the addressee, you must not use, copy,
disclose or take any action based on this message or any
information herein.  If you have received this message in
error, please advise the sender immediately by reply e-mail
and delete this message.  Thank you for your cooperation.
+=========================================================+


Mime

*                                 Unnamed multipart/alternative (inline,
None, 0 bytes)

o
<http://mail-archives.apache.org/mod_mbox/jakarta-poi-user/200604.mbox/r
aw/%
[EMAIL PROTECTED]
%3e/
1> Unnamed text/plain (inline, None, 1067 bytes)




View
<http://mail-archives.apache.org/mod_mbox/jakarta-poi-user/200604.mbox/r
aw/%
[EMAIL PROTECTED]
%3e>
raw message







The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to