import jxl.*;
import jxl.write.*;
workbook = Workbook.createWorkbook(
new File("test28.xls"),
Workbook.getWorkbook(new File("test1.xls"))
)
sheet = workbook.getSheet(0)
sheet.setColumnView(0, 20)
// A1セルの右と下に罫線を描画する
wc = sheet.getWritableCell(0,0)
cf = new WritableCellFormat(wc.getCellFormat())
cf.setBorder(Border.RIGHT, BorderLineStyle.THIN)
cf.setBorder(Border.BOTTOM, BorderLineStyle.THIN)
wc.setCellFormat(cf)
workbook.write()
workbook.close()
サンプルExcelブック(test1.xls)
出力Excel(test28.xls)
動作環境
groovy 1.7.0, JDK6 Upadate18, JExcelAPI 2.6.12
0 件のコメント:
コメントを投稿