記錄如何使用EasyExcel

@Test public void test2(){

//最終生成需要的excel

String fileName = "../excelstore/test6.xlsx";

//test3是模版

String tempFileName="../excelstore/test5.xlsx";

 TestMaoDto testMaoDto = new TestMaoDto();
 
 testMaoDto.setId(1L);
 
 testMaoDto.setName("zhangsan");
 
 testMaoDto.setAge(12);
 
 EasyExcel.write(fileName).withTemplate(tempFileName).sheet(1).doFill(testMaoDto);

} }

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章