Question: how to set date format in excel in java?
Answer: Create a workbook object.
Create a XSSFSheet object.
Now create a CreationHelper object (This is needed to style the date object)
Now create row/cells to write the date.
Create CellStyle and apply the CreationHelper object to format the date in your formats.