import jxl.*;
import jxl.write.*;
workbook = Workbook.createWorkbook(
new File("test41.xls"),
Workbook.getWorkbook(new File("test1.xls"))
)
sheet = workbook.getSheet(0)
dt = new DateTime(0, 2,
(new GregorianCalendar(2010, 4-1, 12)).getTime()
)
dt.setCellFormat(
new WritableCellFormat(
new DateFormat("yyyy/M/d")
)
)
sheet.addCell(dt)
workbook.write()
workbook.close()
サンプルExcelブック(test1.xls)
出力Excel(test41.xls)
動作環境
groovy 1.7.0, JDK6 Upadate18, JExcelAPI 2.6.12
0 件のコメント:
コメントを投稿