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

使用模板引擎导出excel抛出超过单元格最大字符长度异常,而不使用模板引擎就不会报错 #331

Open
yanchuanqi01 opened this issue Oct 19, 2021 · 4 comments

Comments

@yanchuanqi01
Copy link

Bug描述
描述Bug产生的现象(A clear and concise description of what the bug is.)
使用模板引擎导出excel抛出异常,超过单元格最大字符长度,虽然我有的字段很长,但都在32767长度以内,而且我不使用模板引擎就不会报错能成功导出

Bug复现
按如下步骤复现(Steps to reproduce the behavior):
就把你示例的代码改了改,数据是一些英文的描述信息

期望的结果
期望的结果是什么(A clear and concise description of what you expected to happen.)

@yanchuanqi01
Copy link
Author

今天我又试了下,原先我的数据是Map,我想用模板引擎写写样式,发现一直报单元格字符长度太长的异常,我今天新建了导出pojo,用注解写了些样式,导出一切正常,在使用模板引擎导出过程中,有时候数据能成功导出但数据有缺失

@liaochong
Copy link
Owner

可以提供下对应的超长文本吗?以及对应的模板引擎是什么?

@yanchuanqi01
Copy link
Author

beetl和freemarker都试过,都会报相同的错误
新建文本文档.txt

@yanchuanqi01
Copy link
Author

freemarkerToExcelExample.txt
这是模板文件,去掉第二列就不会报错了,但是第二列内容并不是很长

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants