I am writing dates in rows in xlsx file with Apache POI scala.
It is writing in file and showing format as Custom date but values are not reflecting as Custom date until I am clicking double on that cell. After double click it is converting as custom date.
Can someone please tell me why this cell formatting is not reflecting on values. I have tried all ways available on stack overflow for formatting in apache POI.
val cellStyle = workbook.createCellStyle();
val df = workbook.createDataFormat();
cellStyle.setDataFormat(df.getFormat("MMM-yy"))
cell.setCellValue(r)
cell.setCellStyle(cellStyle)