Lloyd,
The following code works for me:
<code>
import java.io.FileOutputStream;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
public class SimpleTest {
public static void main(String[] args) throws Exception {
HSSFWorkbook workbook = new HSSFWorkbook();
HSSFCell cell =
workbook.createSheet().createRow(0).createCell((short) 0);
cell.setCellFormula("SUM(1.5,2.3333)");
workbook.write(new FileOutputStream("Simple.xls"));
}
}
</code>
Are you trying something along different lines?
What is the exact nature of the problem you are
facing (exception/unexpected results)?
~ amol
> -----Original Message-----
> From: Lloyd H. Meinholz [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 17, 2005 9:37 AM
> To: [email protected]
> Subject: setCellFormula() quest
>
>
> Is there a way to use setCellFormula() when the cell values
> included in
> the formula are non integer numeric values (ex. 3.5)?
>
> I seem to be able to get setCellFormula() to work with int's but not
> other numeric types. If not, is it really difficult to add
> that support
> or should it be relatively easy? Thanks,
>
> Lloyd
>
> ---------------------------------------------------------------------
> 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/
>
---------------------------------------------------------------------
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/