I want to set date in date format in excel file with Apache POI. The value will set in such a manner so that in Address Bar it will show in mm/dd/YYYY and in cell it will show i
Best approach is:
HSSFDataFormatter hdf = new HSSFDataFormatter(); System.out.println (hdf.formatCellValue(mycell));
This worked completely fine with me. This piece of code simply returns the cell in its raw form, no change at all in its format.