【发布时间】:2013-01-10 18:43:54
【问题描述】:
我正在通过以下教程在 Excel 表中使用 poi API 编写日期 http://poi.apache.org/spreadsheet/quick-guide.html#CreateDateCells 但是当我尝试运行代码时,提交的日期显示“###”而不是实际日期!! 这是代码sn-p
CellStyle cellStyle = wb.createCellStyle();
cellStyle.setDataFormat(createHelper.createDataFormat().getFormat("m/d/yy h:mm"));
Cell cell= row.createCell(4);
cell.setCellValue(new Date());
cell.setCellStyle(cellStyle);
【问题讨论】:
标签: apache-poi