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

基类派生类导出自定义表头排序导出数据于表头不一致 #226

Closed
263613093 opened this issue Jan 7, 2021 · 3 comments · Fixed by #228
Closed

基类派生类导出自定义表头排序导出数据于表头不一致 #226

263613093 opened this issue Jan 7, 2021 · 3 comments · Fixed by #228
Assignees
Labels

Comments

@263613093
Copy link
Contributor

BaseEntity类定义了A,B,C三个属性,ExporterHeader的ColumnIndex分别为1,2,3
D,E,F三个属性设置ExporterHeader的ColumnIndex分别为30,31,31

然后创建EntityA继承BaseEntity,有X,Y,Z三个属性设置ExporterHeader的ColumnIndex分别为11,12,13

这时候调用ExcelExporter的ExportAsByteArray方法导出xlsx文件
头的顺序为A,B,C,X,Y,Z,D,E,F这个是没问题的
但是数据顺序却是X,Y,Z,A,B,C,D,E,F这个是有问题的

@hueifeng hueifeng added the area-excel excel label Jan 7, 2021
@263613093
Copy link
Contributor Author

ExportXls.zip
示例代码已上传

@263613093
Copy link
Contributor Author

刚又发现了,不仅仅类继承导出有问题
单独的类导出列头索引也会有问题
例如,上面定义的类属性设置列头索引高于下面的类属性列头索引,就会出问题

@hueifeng hueifeng self-assigned this Jan 8, 2021
@xin-lai
Copy link
Collaborator

xin-lai commented Jan 11, 2021

@263613093 用下最新版本试试

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

Successfully merging a pull request may close this issue.

3 participants