alibaba/easyexcel

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

Open

#4079 aperta il 17 gen 2025

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)Java (7599 fork)batch import
help wanted

Metriche repository

Star
 (33.728 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor