easyexcel
easyexcel copied to clipboard
文档内容:不创建对象的写(可以使用maps设置head吗)
文档:https://easyexcel.opensource.alibaba.com/docs/current/quickstart/write#%E4%B8%8D%E5%88%9B%E5%BB%BA%E5%AF%B9%E8%B1%A1%E7%9A%84%E5%86%99
比如能不能这样:
Map<String, String> headMap = new HashMap<>();
headMap.put("id", "序号");
headMap.put("name", "名称");
List<Map<String, String>> rows = new ArrayList<>();
rows.add(Map.of("id", 1, "name", "xxx"));
...
然后交给easyexcel帮忙导出
有 list 的 AbstractParameterBuilder 保证顺序即可
不创建对象的写,看head()方法入参只支持List<List<String>>。