alibaba/easyexcel

文档内容:不创建对象的写(可以使用maps设置head吗)

Open

#4,079 opened on Jan 17, 2025

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Java (33,728 stars) (7,599 forks)batch import
help wanted

Description

文档: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帮忙导出

Contributor guide