List<exportDTO> list = new ArrayList<>();
ExportParams params = new ExportParams();
workbook = ExcelExportUtil.exportBigExcel(params, exportDTO.class, list);
File savefile = new File("E:/Code/");
if (!savefile.exists()) {
savefile.mkdirs();
}
Random rand = new Random();
String num = String.valueOf(rand.nextInt(50));
FileOutputStream fos = new FileOutputStream("E:/Code/我的excel" + num + ".xls");
workbook.write(fos);
fos.close();
easypoi 导出 demo
最新推荐文章于 2024-09-15 14:04:43 发布