You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Ole Nordmann <ol...@gmail.com> on 2010/11/24 14:41:59 UTC

Cells with dates have "user defined" format.

Among alot of other data I am trying to make some of the cells with dates
and have done it as suggested in the "Developers' Guide to HSSF and XSSF
Features". I make a new cellstyle and change dataformat. Everything is shown
as I want when opening the file with Excel 2007. For instance if I use
dd.mm.yyyy or dd/mm/yyyy the output will be for instance 22/11/2010. When
setting cellValue I have tried with both Calendar and Date as input.

The problem is the format of the cell is shown as "User Defined" instead of
"Date". My output file is going to be converted by another program and it
expects it as a "Date". It is alot of data so I doing it manually would be
too time consuming.

Any ideas if this is possible and if so what I am doing wrong?

-Ole.

Re: Cells with dates have "user defined" format.

Posted by Gabriel Molina <sk...@gmail.com>.
Hello!

What kind of file are you creating (hssf or xssf)?
It's the same with another version of Excel or with OpenOffice?

Regards


On Wed, Nov 24, 2010 at 7:41 AM, Ole Nordmann <ol...@gmail.com> wrote:
> Among alot of other data I am trying to make some of the cells with dates
> and have done it as suggested in the "Developers' Guide to HSSF and XSSF
> Features". I make a new cellstyle and change dataformat. Everything is shown
> as I want when opening the file with Excel 2007. For instance if I use
> dd.mm.yyyy or dd/mm/yyyy the output will be for instance 22/11/2010. When
> setting cellValue I have tried with both Calendar and Date as input.
>
> The problem is the format of the cell is shown as "User Defined" instead of
> "Date". My output file is going to be converted by another program and it
> expects it as a "Date". It is alot of data so I doing it manually would be
> too time consuming.
>
> Any ideas if this is possible and if so what I am doing wrong?
>
> -Ole.
>



-- 
ちりも積もれば山となる

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org