If I use HSSFSheet#shiftRows() it will not copy the CellStyle of the row befor. I fix it very bad and slowly this way: public void insertRowAfter(int rowNum) { HSSFRow row = sheet.getRow(rowNum); sheet.shiftRows(rowNum + 1, sheet.getLastRowNum(), 1, true, true); HSSFRow newRow = sheet.getRow(rowNum + 1); for (short i = 0; i <= row.getLastCellNum(); i++) { HSSFCell cell = row.getCell(i); HSSFCell newCell = newRow.getCell(i); if (cell != null) { if (newCell == null) newCell = newRow.createCell(i); newCell.setCellStyle(cell.getCellStyle()); } } } Is this a bug- or future- request?
A quick test showed that this seems to work correctly with the current version of POI, please try it again with at least POI 3.12beta1 and reopen this bug with some more information if it still does not work for you.