implementation group: ‘com.alibaba’, name: ‘easyexcel’, version: ‘2.2.6’
Maven
com.alibaba
easyexcel
2.2.6
//保存路径与名字
private final static String fileName = “E:\” + System.currentTimeMillis() + “.xlsx”;
@Test
// public static void easyUtil(List heads,String head,List<Map<String, Object>> list){
public void easyUtil(){
List heads = new ArrayList<>(); //表头信息
heads.add(“银行名称”);
heads.add(“期间新增项目”);
heads.add(“期间新增担保总额”);
heads.add(“期间新增解保项目数”);
heads.add(“期间新增解保金额”);
heads.add(“在保项目数”);
heads.add(“在保余额”);
heads.add(“银行利率”);
String head=“惠农通数据表”; //主表头
List<Map<String, Object>> list = new ArrayList<>();
Map<String,Object> test = new LinkedHashMap<>(); //手动添加测试数据&