Hello Maria,
I am having the same problem. Please let me know if you are able to get the excel 
sheet calculate the formula on load.
 
Thanks
Pavan

Maria Gutierrez <[EMAIL PROTECTED]> wrote:
Sorry,

I forgot to say that I'm not using the = in the formula passed.

I'm passing in 
"IF(EXACT(B101,0),PRODUCT(C101,100),ROUND((C101-B101)/B101*100,0)) "

Maria

Danny Mui wrote:

> try taking out the = in the formula when setting it
>
> Maria Gutierrez wrote:
>
>> Hi,
>>
>> I'm trying to get this following formula working when generating an 
>> Excel file using HSSF.
>>
>> =IF(EXACT(B101,0),PRODUCT(C101,100),ROUND((C101-B101)/B101*100,0))
>>
>> I use the following code:
>>
>> HSSFCell c = r.createCell(cellnum);
>> c.setCellType(HSSFCell.CELL_TYPE_FORMULA);
>> c.setCellFormula(formula); //The string above
>>
>> When using it in normal Excel the formula works fine. In the HSSF 
>> generated file I'm getting a #VALUE! error. However, if I click in 
>> the formula in excel and confirm it without changing anything it also 
>> works.
>>
>> Any way to sort out my problem?
>>
>> Cheers.
>>
>> Maria
>>
>>
>> ________________________________________________________________________
>>
>> E-mail is an informal method of communication and may be subject to 
>> data corruption, interception and unauthorised amendment for which 
>> Digital Bridges Ltd will accept no liability. Therefore, it will 
>> normally be inappropriate to rely on information contained on e-mail 
>> without obtaining written confirmation.
>>
>> This e-mail may contain confidential and/or privileged information. 
>> If you are not the intended recipient (or have received this e-mail 
>> in error) please notify the sender immediately and destroy this 
>> e-mail. Any unauthorized copying, disclosure or distribution of the 
>> material in this e-mail is strictly forbidden.
>>
>> ________________________________________________________________________
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


________________________________________________________________________

E-mail is an informal method of communication and may be subject to data corruption, 
interception and unauthorised amendment for which Digital Bridges Ltd will accept no 
liability. Therefore, it will normally be inappropriate to rely on information 
contained on e-mail without obtaining written confirmation.

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.

________________________________________________________________________


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


                
---------------------------------
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!

Reply via email to