Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to print the exact date cell value in the excel sheet date format like mm/dd/yyyy using apache poi

Tags:

apache-poi

I am using apache poi 3.5 for extracting data from the excel sheet.i having the date cell formatted in mm/dd/yyyy.

If i print using cell.getDateCellValue() then print the date in other format.so, i want to print the date that is in the actual format of excel sheet cell.

how i do it..Please guide me way to do it....

Saravanan

like image 893
Saravanan Avatar asked Nov 16 '10 07:11

Saravanan


1 Answers

just call the method formatCellValue(Cell), formatCellValue(cell, formulaEvaluator) in the DataFormatter class. It will print the value as it is in the excel sheet.

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

like image 121
Saravanan Avatar answered Jan 03 '23 18:01

Saravanan