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

feat: 支持写excel实体对象含有列表类型属性字段,可进行动态写入,可支持原有类相关注解对动态列做设置 #2317

Open
wants to merge 5 commits into
base: developing
Choose a base branch
from

Conversation

yarooh
Copy link

@yarooh yarooh commented Feb 14, 2022

  1. 按照指定class写时,如果该实体成员属性中含有集合(Collection) 类型 或 数组类型 (Array),使用了@ExcelDynamicColumn在成员属性上,并且在对应的类上用@ExcelDynamicClass标注后,即可做动态列支持。
  2. 目前仅支持集合(Collection) 类型 或 数组类型 (Array)动态扩展,集合的泛型类也不能是基础类型和非普通的类(接口、抽象类等)。
  3. 该动态列,支持原有类上的所有样式注解,但目前还不支持动态表头名。

@CLAassistant
Copy link

CLAassistant commented Feb 14, 2022

CLA assistant check
All committers have signed the CLA.

@MaxwellAlen
Copy link

大佬,能不能提供一个使用案例

@yarooh
Copy link
Author

yarooh commented Feb 18, 2022

我在提交的代码里,写了对应的测试用例了,感兴趣可以看看 WriteTest.dynamicColumnWrite 这个方法

@MaxwellAlen
Copy link

好的,什么时候能把这提交合并到官方,这个实现太棒了

@yarooh
Copy link
Author

yarooh commented Feb 18, 2022

哈哈,我也不知道官方会不会采纳我这个提交

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

Successfully merging this pull request may close these issues.

3 participants