POI 大标题样式

// 大标题的样式
public CellStyle bigTitle(Workbook wb) {
	CellStyle style = wb.createCellStyle();
	Font font = wb.createFont();
	font.setFontName("宋体");
	font.setFontHeightInPoints((short) 16);
	font.setBoldweight(Font.BOLDWEIGHT_BOLD); // 字体加粗

	style.setFont(font);
	style.setAlignment(CellStyle.ALIGN_CENTER); // 横向居中
	style.setVerticalAlignment(CellStyle.VERTICAL_CENTER); // 纵向居中

	return style;
}

猜你喜欢

转载自blog.csdn.net/shishize55/article/details/83892148
poi
今日推荐