List of usage examples for org.apache.poi.ss.usermodel CellStyle cloneStyleFrom
void cloneStyleFrom(CellStyle source);
From source file:workbench.db.exporter.XlsRowDataConverter.java
License:Apache License
private CellStyle geCachedStyle(CellStyle baseStyle, int column, boolean isHeader) { Map<Integer, CellStyle> styleCache = isHeader ? headerStyles : styles; CellStyle style = style = styleCache.get(column); if (style == null) { style = workbook.createCellStyle(); style.cloneStyleFrom(baseStyle); styleCache.put(column, style);/*from w w w . java 2 s . c o m*/ } return style; }