Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多列表填充若同一列有两个列表数据源,填充后两个列表数据展示错乱 #3766

Open
liweiye-2021 opened this issue Apr 16, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@liweiye-2021
Copy link

image

相关代码:
excelWriter = EasyExcelFactory.write(byteArrayOutputStream).withTemplate(templateFileInputStream).build();
WriteSheet writeSheet = EasyExcelFactory.writerSheet(sheetIndex).build();
writeSheet.setSheetName(sheetNames);
// 如果有多个list 模板上必须有{前缀.} 这里的前缀就是 data1,然后多个list必须用 FillWrapper包裹
List data = sheetList.getOrDefault("data", Collections.emptyList());
if (!data.isEmpty()) {
excelWriter.fill(new FillWrapper("data", data), writeSheet);
}
List data1 = sheetList.getOrDefault("data1", Collections.emptyList());
if (!data1.isEmpty()) {
excelWriter.fill(new FillWrapper("data1", data1), writeSheet);
}

@liweiye-2021 liweiye-2021 added the bug Something isn't working label Apr 16, 2024
@liweiye-2021
Copy link
Author

3.3.2版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants