Hi!

Thanks for your answer!

Yesterday I found a solution, which seems to work.

In order to create a cell formula "1*3.6E-4", I use following statement

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

where convertToString is defined as follows.

    public static String convertToString(double value)
    {
        DecimalFormat format=null;
        String formattedValue=null;

        DecimalFormatSymbols symbols=null;

        symbols=new DecimalFormatSymbols();
        symbols.setDecimalSeparator('.');

        format=new DecimalFormat("#.########################", symbols);

        formattedValue=format.format(value);
        return formattedValue;
    }

Best regards

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