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

导出CSV时不能追加内容 #2860

Open
weijunfu opened this issue Dec 8, 2022 · 0 comments
Open

导出CSV时不能追加内容 #2860

weijunfu opened this issue Dec 8, 2022 · 0 comments
Assignees
Labels
bug Something isn't working pending verification This problem needs to be confirmed planning It may be developed later

Comments

@weijunfu
Copy link

weijunfu commented Dec 8, 2022

建议先去看文档
快速开始常见问题

触发场景描述
导出Excel可以使用withTemplate()实现内容追加。但导出CSV时,不支持 withTemplate(),因此就不能实现追加内容导出。

请问何时才能支持CSV也能使用withTemplate()?或者请提供一种方式可以实现导出CSV时,能够追加内容?

触发Bug的代码

  ExcelWriter excelWriter = EasyExcel.write(file, realT).excelType(ExcelTypeEnum.CSV).needHead(false).withTemplate(file).file(tempFile).build();

提示的异常或者没有达到的效果

com.alibaba.excel.exception.ExcelGenerateException: csv cannot use template.
	at com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder.copyTemplate(WriteWorkbookHolder.java:239)
	at com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder.<init>(WriteWorkbookHolder.java:207)
	at com.alibaba.excel.context.WriteContextImpl.initCurrentWorkbookHolder(WriteContextImpl.java:107)
	at com.alibaba.excel.context.WriteContextImpl.<init>(WriteContextImpl.java:90)
	at com.alibaba.excel.write.ExcelBuilderImpl.<init>(ExcelBuilderImpl.java:36)
	at com.alibaba.excel.ExcelWriter.<init>(ExcelWriter.java:39)
	at com.alibaba.excel.write.builder.ExcelWriterBuilder.build(ExcelWriterBuilder.java:104)
@weijunfu weijunfu added the bug Something isn't working label Dec 8, 2022
@zhuangjiaju zhuangjiaju added the pending verification This problem needs to be confirmed label Jan 16, 2023
@zhuangjiaju zhuangjiaju added the planning It may be developed later label Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending verification This problem needs to be confirmed planning It may be developed later
Projects
None yet
Development

No branches or pull requests

2 participants