我恨我痴心歌词java操作Excel的poi的字体设置package com.java.poi;剑桥商务英语成绩查询
import org.apache.poi.hssf.urmodel.HSSFWorkbook;
import org.apache.poi.ss.urmodel.*;
import java.io.FileOutputStream;anchored
/**fuck什么意思
* 字体设置
* @author nidegui
* @create 2019-06-17 11:30
pik
*/
public class Test7 {
look
public static void main(String[] args) throws Exception {
Workbook wb=new HSSFWorkbook();
瘾君子是什么意思Sheet sheet = wb.createSheet("sheet页");
dtd
Row ateRow(1);
//创建⼀个字体
Font ateFont();
font.tFontHeightInPoints((short) 24);
font.tFontName("Courier New ");
font.tItalic(true);僭越
font.tStrikeout(true);
CellStyle ateCellStyle();
style.tFont(font);
Cell cell = ateCell((short) 1);
cell.tCellValue("this is test of fonts");
cell.tCellStyle(style);
FileOutputStream is=new FileOutputStream("E:\\3.xls");人间天堂的意思
wb.write(is);
is.clo();
}
}