jxl使用小结

/** 设置列宽 author:yyu Apr 15, 2010 */
        wsheet.setColumnView(0, 4);
/** 设置行高 author:yyu Apr 15, 2010 */
        wsheet.setRowView(0, 600);//30
/** 设置单元格样式 author:yyu Apr 15, 2010 */
        WritableFont wfont = new WritableFont(WritableFont.TIMES, 9, WritableFont.NO_BOLD, false);
        WritableCellFormat wcfF = new WritableCellFormat(wfont);
        wcfF.setAlignment(Alignment.CENTRE);
        wcfF.setVerticalAlignment(VerticalAlignment.CENTRE);
        wcfF.setBorder(Border.ALL, BorderLineStyle.THIN);
        wcfF.setWrap(true);
        wcfF.setShrinkToFit(true);
/** 填充固定数据 author:yyu Apr 15, 2010 */
        wsheet.addCell(new Label(0,2,"序号",wcfF));
/** 合并单元格(起始列,起始行,结束列,结束行) author:yyu Apr 15, 2010 */
        wsheet.mergeCells(0,0,11,0);

你可能感兴趣的:(JXL)