CellStyle duplicateStyle(Cell cell, String key) { if (rowStyles.containsKey(key)) { return (CellStyle) rowStyles.get(key); } CellStyle newStyle = Util.duplicateStyle( cell.getRow().getSheet().getPoiWorkbook(), cell.getPoiCell().getCellStyle()); rowStyles.put(key, newStyle); return newStyle; }