poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amol Deshmukh <adeshm...@hobsons-us.com>
Subject RE: Problems with scientific notation in formulae
Date Wed, 09 Feb 2005 20:12:18 GMT
what happens if you simply set the formula to:
      cell.setCellFormula("1*36000");
... would this work for you?

If not, are you able to do the same in excel 
ie. w/o using POI, just by manually entering 
it in excel.
(since POI can do it only if can be done in 
excel in the first place)


~ amol



-----Original Message-----
From: Dmitri Pissarenko [mailto:mailing-lists@dapissarenko.com]
Sent: Wednesday, February 09, 2005 12:13 PM
To: POI Users List
Subject: Problems with scientific notation in formulae


Hello!

I have a problem with using numbers in scientific notation in cell formulae.

For instance, I want to create a cell with the formula "1*3.6E-4". For this
purpose, I first format 3.6E-4 with

DecimalFormat format=null;
format=new DecimalFormat("#.####E0");

and then set the cell formula using

cell.setCellFormula("1*" + format.format(3.6E-4));

The problem is that

cell.getCellFormula()

returns

"1*3"

instead of "1*3.6E-4".

How can solve this problem?

Thanks in advance

Dmitri Pissarenko
--
Dmitri Pissarenko
Software Engineer
http://dapissarenko.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/


Mime
View raw message