Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

ColumnAttribute 能不能支持设置列宽 #30

Closed
DaneSpiritGOD opened this issue Sep 19, 2019 · 6 comments
Closed

ColumnAttribute 能不能支持设置列宽 #30

DaneSpiritGOD opened this issue Sep 19, 2019 · 6 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@DaneSpiritGOD
Copy link

我现在又几列存放的是 json字符串,这个很长,且里面没有换行符,导致导出的Excel那列很宽,比较丑……

我看了下代码,
image
使用了自动列宽

感谢~

@issue-label-bot issue-label-bot bot added the question Further information is requested label Sep 19, 2019
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label question to this issue, with a confidence of 0.66. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@WeihanLi
Copy link
Owner

WeihanLi commented Sep 19, 2019

对的,现在是自动列宽,实现自定义列宽的话,应该没有什么问题,我回头试一下,加一下

@WeihanLi WeihanLi added the enhancement New feature or request label Sep 19, 2019
@DaneSpiritGOD
Copy link
Author

感谢。
其实之前使用 ExcelReport 导出Excel,但是它不支持Attribute标注,导致要写额外的代码,个人感觉不是很方便。
我觉得你的这个项目如果能支持像它那样,导出数据到模版文件,使用的人会增加不少。

@WeihanLi
Copy link
Owner

@DaneSpiritGOD 感谢你的建议,现在还不支持根据指定模板导出,我会考虑一下看怎么实现比较方便

1.4.0 版本已经支持列宽的设置,你可以通过Attribute [Column(Width=30)] 或者 FluentAPI HasColumnWidth(30) 来设置,有问题欢迎反馈,我会尽可能快的回复

关于导出数据到模板文件,新建了一个 issue #33

@DaneSpiritGOD
Copy link
Author

@DaneSpiritGOD 感谢你的建议,现在还不支持根据指定模板导出,我会考虑一下看怎么实现比较方便

1.4.0 版本已经支持列宽的设置,你可以通过Attribute [Column(Width=30)] 或者 FluentAPI HasColumnWidth(30) 来设置,有问题欢迎反馈,我会尽可能快的回复

关于导出数据到模板文件,新建了一个 issue #33

谢谢

@WeihanLi
Copy link
Owner

@DaneSpiritGOD 现在 1.8.x 版本已经支持根据指定模板导出了,可以参考示例项目或者这篇介绍 https://www.cnblogs.com/weihanli/p/12238048.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants