Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 90288

Read data from excel sheet in java with Apache POI

$
0
0

I have a data in an excel sheet that I need to read in java, I am able to read normal Strings but when I try to read a cell that contains a date and time (28/5/2018 10:00) I get only the date as 28-May-2018.

This is the excel cell

enter image description here

This code read: 28-May-2018

enter image description here

row.getCell(6).toString()

This code throws an exception:

row.getCell(6).getStringCellValue()

How can I read the time?

How can I read the date correctly?


Viewing all articles
Browse latest Browse all 90288

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>