try this.....
String data = "3";
cellStyle = workbook.createCellStyle();
cellStyle.setDataFormat(                                
        dataFormat.getFormat("#.0000");
cell.setCellStyle(cellStyle);
cell.setCellValue( data);


Can somebody help me on this...
I want to copy formula from one cell to a cell below/next to it.
How do I do it? Ex: If the formula in the cell is SUM(a2:a5) and if 
copy it to a cell below it the formula copied should be SUM(b2:b5).

Regds,
Suma

----- Original Message -----
From: Dimitri Pissarenko <[EMAIL PROTECTED]>
Date: Monday, November 17, 2003 2:12 am
Subject: HSSF, User-defined cell formats

> Hello!
> 
> I want to create an Excel report with POI, where the numbers are
> formatted in the following way:
> 
> 0.0000
> 
> Such a format does not exist among the built-in HSSF data formats
> (according to
> http://jakarta.apache.org/po).
> 
> How can I create a user-defined data format?
> 
> TIA
> 
> Dimitri Pissarenko
> 
> -------------------------------------------------------------------
> --
> 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]

Reply via email to