Excel Cell Style issue
I am using below code to get date value from XLSX file. This is working absolutely fine for some xlsx file . But It is not giving exact date format which is in xlsx file. This issue is for some file. eg; I have date like this 21/01/2016 (dd/mm/yyyy) but after reading, it gives date as 01/21/16(mm/dd/yy) Is there any other way to get cellstyle? Is it issue of xlsx file?? String dateFmt = cell.getCellStyle().getDataFormatString(); if (DateUtil.isCellDateFormatted(cell)) { double val = cell.getNumericCellValue(); Date date = DateUtil.getJavaDate(val); String dateFmt = cell.getCellStyle()