赞
踩
通过WriteCellStyle 的dataFormat属性和BuiltinFormats指定字体格式
这种单元格有内容时字体才会生效,无内容时还是"常规"格式
private static WriteHandler templateWriteHandler;
static {
//表头样式
WriteCellStyle headWriteCellStyle = new WriteCellStyle();
//字体
WriteFont headWriteFont = new WriteFont();
headWriteFont.setFontHeightInPoints((short) 11);
headWriteFont.setBold(true);
headWriteCellStyle.setWriteFont(headWriteFont);
//边框
headWriteCellStyle.setBorderBottom(BorderStyle.THIN);
headWriteCellStyle.setBorderLeft(BorderStyle.THIN);
headWriteCellS
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。