Set Date format using Apache POI
问题 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 in dd-mmm (Date in numeric and Month in String like 01-Jan). Will you please help me in this situation? 回答1: You can apply a HSSFCellStyle to the cell you need to fill. Here some code snippets from my past work, it's not intact but shows the basic idea: HSSFRow row = sheet.createRow(0); HSSFCell cell = row.createCell(