|
|
|
@ -13,8 +13,8 @@ import java.util.Map;
|
|
|
|
|
* Create by davep at 2020-03-12 11:59
|
|
|
|
|
*/
|
|
|
|
|
public class ExcelTemplate {
|
|
|
|
|
public static final CellStyleFactory STYLE_LEFT = new CellStyleFactory(CellStyle.BORDER_MEDIUM, CellStyle.ALIGN_LEFT);
|
|
|
|
|
public static final CellStyleFactory STYLE_RIGHT = new CellStyleFactory(CellStyle.BORDER_MEDIUM, CellStyle.ALIGN_RIGHT);
|
|
|
|
|
public static final CellStyleFactory STYLE_LEFT = new CellStyleFactory(CellStyle.BORDER_THIN, CellStyle.ALIGN_LEFT);
|
|
|
|
|
public static final CellStyleFactory STYLE_RIGHT = new CellStyleFactory(CellStyle.BORDER_THIN, CellStyle.ALIGN_RIGHT);
|
|
|
|
|
private Map<String, SheetTemplate> sheets;
|
|
|
|
|
|
|
|
|
|
public ExcelTemplate() {
|
|
|
|
@ -104,7 +104,7 @@ public class ExcelTemplate {
|
|
|
|
|
rowNum++;
|
|
|
|
|
Workbook workbook = sheet.getWorkbook();
|
|
|
|
|
Font boldFont = PoiUtils.initBoldFont(workbook);
|
|
|
|
|
CellStyle titleStyle = new CellStyleFactory(CellStyle.BORDER_MEDIUM, CellStyle.ALIGN_CENTER).buildCellStyle(workbook, boldFont);
|
|
|
|
|
CellStyle titleStyle = new CellStyleFactory(CellStyle.BORDER_THIN, CellStyle.ALIGN_CENTER).buildCellStyle(workbook, boldFont);
|
|
|
|
|
for (int i = 0, len = columns.size(); i < len; i++) {
|
|
|
|
|
ColumnTemplate col = columns.get(i);
|
|
|
|
|
Cell cell = titleRow.createCell(i, Cell.CELL_TYPE_STRING);
|
|
|
|
|