JAVA技巧:poi操作excel

JAVA技巧:poi操作excel,第1張

JAVA技巧:poi操作excel,第2張

包裝*。*;
導入Java . util . ArrayList;
導入Java . util . iterator;
導入org . Apache . poi . hssf . user model . hssf cell;
導入org . Apache . poi . hssf . user model . hssfcellstyle;
導入org . Apache . poi . hssf . user model . hssf font;
導入org . Apache . poi . hssf . user model . HSS flow;
導入org . Apache . poi . hssf . user model . hssf sheet;
導入org . Apache . poi . hssf . user model . hssf workbook;
public class font cellstyle {
private static hssf font font style = null;
private static HSSFCellStyle cellStyle = null;

public static hssf font gethdrfont(hssf workbook WB){
font style = WB . create font();
fontStyle.setFontName("微軟雅黑");
font style . setfontheightinpoints((short)20);
font style . setboldwight(hssf font。BOLD weight _ BOLD);
返廻fontStyle
}
public static hssf font getFtrFont(hssf workbook WB){
font style = WB . create font();
fontStyle.setFontName("微軟雅黑");
font style . setfontheightinpoints((short)12);
font style . setboldwight(hssf font。bold weight _ NORMAL);
返廻fontStyle
}
public static hssf font getcontent font(hssf workbook WB){
font style = WB . create font();
fontStyle.setFontName("微軟雅黑");
font style . setfontheightinpoints((short)12);
font style . setboldwight(hssf font。bold weight _ NORMAL);
返廻fontStyle
}

位律師廻複

生活常識_百科知識_各類知識大全»JAVA技巧:poi操作excel

0條評論

    發表評論

    提供最優質的資源集郃

    立即查看了解詳情