We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
通过分析已经定位到相应的框架源代码位置了:
easyexcel/src/main/java/com/alibaba/excel/context/WriteContextImpl.java
Lines 161 to 174 in 245be48
这段代码是用表序号去查,查不到就创建一个表,但是创建的表序号和获取的表序号并不一致
使用场景抽象:
WriteSheet totalSheet = EasyExcel .writerSheet(1, "总分") .head(DownloadData.class) .registerWriteHandler(new FreezeAndFilter()) .build(); WriteSheet detailSheet = EasyExcel .writerSheet(2, "明细") .head(DownloadData.class) .registerWriteHandler(new FreezeAndFilter()) .build(); // WriteSheet logSheet = null; WriteSheet logSheet = EasyExcel .writerSheet(3, "日志") .head(LogData.class) .registerWriteHandler(new FreezeAndFilter()) .build(); for (EvalScoreDO evalScoreDO : cursor) { writer.write(Collections.singletonList(detailData), detailSheet); if(bool1){ writer.write(Collections.singletonList(new LogData(level, msg)), logSheet); } if(bool2){ writer.write(Collections.singletonList(totalsData), totalSheet); } }
这里如果某条数据有错先写入了日志就会导致日志和明细的数据重叠覆盖, 目前我暂时调换了日志和总分的顺序,并通过代码逻辑确保数据首次写入顺序一致。
The text was updated successfully, but these errors were encountered:
修复多个sheet不按照顺序写入 会错误的bug #1332
sheet
852f0ec
39b0239
修复多个sheet不按照顺序写入 会乱序的bug #1332
39ed3a6
非常感谢您的意见,已经在最新版修复。
Sorry, something went wrong.
No branches or pull requests
通过分析已经定位到相应的框架源代码位置了:
easyexcel/src/main/java/com/alibaba/excel/context/WriteContextImpl.java
Lines 161 to 174 in 245be48
这段代码是用表序号去查,查不到就创建一个表,但是创建的表序号和获取的表序号并不一致
使用场景抽象:
这里如果某条数据有错先写入了日志就会导致日志和明细的数据重叠覆盖,
目前我暂时调换了日志和总分的顺序,并通过代码逻辑确保数据首次写入顺序一致。
The text was updated successfully, but these errors were encountered: