You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by John Byrne <jb...@snbw.org> on 2008/09/10 21:45:11 UTC

#VALUE results from entering formula with POI

This happens with the POI 3.1-FINAL library but not with the POI
2.5.1-FINAL library.  The code is exactly the same for both of them.

If I force the cellType with setCellType the same thing happens.

 

Here's a code snippet:

            StyleHelper.setPrecisionOne(ec.getCell("B45"),ec);

            ec.getCell("B45").setCellType(HSSFCell.CELL_TYPE_FORMULA);

            ec.getCell("B45").setCellFormula("IF(B38=\"\", \"\",
B42/B38)");

 

Any suggestions?

Thank you in advance...

 

John

 

John Byrne

Support Network for Battered Women

1257 Tasman Dr. Suite C

Sunnyvale, CA

94089

 

(408) 541-6100 x 138

Fax: (408) 541-3333

 


Re: #VALUE results from entering formula with POI

Posted by Tony Nelson <tn...@starpoint.com>.
I just spent the past couple days troubleshooting a very similar  
issue.  In the end, the only fix I could come up with is to check out  
3.2-alpha1 from svn.  It was actually quite easy to build.

If you look back at the history of this list you will find some of the  
other suggestions I got.  They didn't work for me, but they might work  
for you.

Tony


On Sep 10, 2008, at 3:45 PM, John Byrne wrote:

> This happens with the POI 3.1-FINAL library but not with the POI
> 2.5.1-FINAL library.  The code is exactly the same for both of them.
>
> If I force the cellType with setCellType the same thing happens.
>
>
>
> Here's a code snippet:
>
>            StyleHelper.setPrecisionOne(ec.getCell("B45"),ec);
>
>            ec.getCell("B45").setCellType(HSSFCell.CELL_TYPE_FORMULA);
>
>            ec.getCell("B45").setCellFormula("IF(B38=\"\", \"\",
> B42/B38)");
>
>
>
> Any suggestions?
>
> Thank you in advance...
>
>
>
> John
>
>
>
> John Byrne
>
> Support Network for Battered Women
>
> 1257 Tasman Dr. Suite C
>
> Sunnyvale, CA
>
> 94089
>
>
>
> (408) 541-6100 x 138
>
> Fax: (408) 541-3333
>
>
>


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