poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominik Stadler <dominik.stad...@gmx.at>
Subject Re: Excel Formula for POI
Date Fri, 02 Aug 2019 16:58:29 GMT
Hi,

Did you try something like

cellStyle.setDataFormat(
        createHelper.createDataFormat().getFormat("m/d/yy h:mm"));

The complete example is available at
http://poi.apache.org/components/spreadsheet/quick-guide.html#CreateDateCells

Regards.. Dominik.



On Sat, Jun 29, 2019 at 4:33 AM shibsankar <srcjnu@gmail.com> wrote:

> Hi,
>
> I am doing excel parsing with POI.
>
> I have an excel cell where Formula is written.
>
> Formula is :  =MROUND((IF(NZ38="","",NZ38+OB38)),TIME(0,10,0)).  This shows
> data in cell like this : Mon 30/12 23:30
>
> But I want the data in this format : 12/30/19 23:10 . I get this  when I do
> Format cell > right click > Format Cell > Date > Type [ MM/DD/YY HH:MM ](24
> hrs)
>
> How do I get the same by POI programmatically ?
>
> Thanks
> Shib
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message