阅读背景:

poi 文字样式

来源:互联网 
!-- flowchart 箭头图标 勿删 --
// 文字样式
public CellStyle text(Workbook wb) {
	CellStyle style = wb.createCellStyle();
	Font font = wb.createFont();
	font.setFontName("Times New Roman");
	font.setFontHeightInPoints((short) 10);

	style.setFont(font);

	style.setAlignment(CellStyle.ALIGN_LEFT); // 横向居左
	style.setVerticalAlignment(CellStyle.VERTICAL_CENTER); // 纵向居中

	style.setBorderTop(CellStyle.BORDER_THIN); // 上细线
	style.setBorderBottom(CellStyle.BORDER_THIN); // 下细线
	style.setBorderLeft(CellStyle.BORDER_THIN); // 左细线
	style.setBorderRight(CellStyle.BORDER_THIN); // 右细线

	return style;
}
// 文字样式
pu



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: