Hi, You can use 1) DateUtil.isCellDateFormatted(cell) to determine whether a cell is formatted as a date, and 2) DateUtil.getJavaDate(date) where date is a double (that you can get from the cell)
Best regards, Markus > On 22 Mar 2017, at 07:44, kakadi <k.krishnamoha...@gmail.com> wrote: > > I have a simple excel sheet(.xlsx) with a number of rows. For one of cell the > data type is "Date" and I can see the date in correct format in Excel. But > when I read excel using XMLStreamReader(poi's XSSFReader api) I get some > double value for this cell. > > I need to be able to: > > 1. determine data type of cell > > 2. if it is date data type then I want to convert the double value to date, > as i am not sure which cell is of type date > > How can I do this? > > > > -- > View this message in context: > http://apache-poi.1045710.n5.nabble.com/How-to-identify-date-cell-type-using-XMLStreamReader-poi-s-XSSFReader-api-tp5727025.html > Sent from the POI - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@poi.apache.org > For additional commands, e-mail: user-h...@poi.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@poi.apache.org For additional commands, e-mail: user-h...@poi.apache.org