When I tried to write data, i also wrote code to set Cell Style using Cell Style class. after execution of the code. it creates excel file with just data not cell Styles. Can anyone please tell me why? I also search everywhere. My Code is same as what every where suggested.
CellStyle styleGreen = cell.getRow().getSheet().getWorkbook().createCellStyle();
styleGreen.setBorderBottom(CellStyle.BORDER_MEDIUM_DASHED);
cell.setCellStyle(sty??leGreen);
See Question&Answers more detail:os