/**
* WritableFont 构成参数说明:
* 参数一(字体):DengXian
* 参数二(字体大小):12
* 参数三(是否加粗):不加粗( WritableFont.NO_BOLD )
* 参数四(是否斜体):不斜体( false )
*/
private static WritableCellFormat cellFormat() throws Exception{
WritableFont writableFont = new WritableFont(WritableFont.createFont("DengXian"),12, WritableFont.NO_BOLD, false);
WritableCellFormat writableCellFormat = new WritableCellFormat(writableFont);
writableCellFormat.setBorder(jxl.format.Border.ALL,jxl.format.BorderLineStyle.THIN);//设置上下左右实线边框
// writableCellFormat.setBorder(jxl.format.Border.RIGHT, BorderLineStyle.THIN);//设置右边框为实线
// writableCellFormat.setBorder(jxl.format.Border.BOTTOM, BorderLineStyle.THIN);//设置下边框为实线
// writableCellFormat.setBorder(jxl.format.Border.LEFT, BorderLineStyle.THIN);//设置左边框为实线
// writableCellFormat.setBorder(jxl.format.Border.TOP, BorderLineStyle.THIN);//设置上边框为实线
writableCellFormat.setVerticalAlignment(jxl.format.VerticalAlignment.CENTRE);
writableCellFormat.setAlignment(jxl.format.Alignment.CENTRE);
writableCellFormat.setWrap(true);//设置自动换行
return writableCellFormat;
}
/**
* WritableFont 构成参数说明:
* 参数