try this
HSSFCellStyle styleData = wb.createCellStyle();
styleData.setDataFormat(dataFormat.getFormat("dd.MM.yy"));
cell.setCellValue(date);
cell.setCellStyle(styleData);

On Mon, Aug 25, 2008 at 11:08 AM, sps <[EMAIL PROTECTED]> wrote:

>
> now i am using
>
> cell.setCellValue(date);
> date is in format of "dd/MM/yyyy"
>
> But when it set on excel , it sets as number.
> I need the date as in same format as what i given.
>
> Assist me.
> --
> View this message in context:
> http://www.nabble.com/How-to-set-the-Date-in-excel-through-Java--tp19140264p19140264.html
> Sent from the POI - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
**Hope can be ignited by a spark of encouragement *****

Reply via email to