How to print exact cell value in Excel date format, e.g. mm / dd / yyyy using apache poi

I am using apache poi 3.5 to retrieve data from excel.i sheet having a date cell formatted in mm / dd / yyyy.

If I print using cell.getDateCellValue (), then print the date in a different format. So, I want to print a date that is in the actual excel sheet cell format.

how am i doing this. Please give me a way to do this ....

Saravanan

+5
source share
1 answer

simply call the method formatCellValue(Cell), formatCellValue(cell, formulaEvaluator)in the classroom DataFormatter. It will print the value as on an excel sheet.

formatCellValue(cell, formulaEvalator) for formula cells ...

+6
source

All Articles