Twig Excel Bundle 自动调整大小 [英] Twig Excel Bundle autosize
本文介绍了Twig Excel Bundle 自动调整大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在 Twig Excel Bundle 中设置自动调整大小?https://twigexcelbundle.readthedocs.io/en/latest/
How to set autosize in Twig Excel Bundle ? https://twigexcelbundle.readthedocs.io/en/latest/
推荐答案
你可以通过columnDimension设置一个sheet的默认
autoSize
属性为true
代码>:
You can set the default autoSize
property of a sheet to true
via columnDimension
:
{% xlssheet 'Worksheet' {
columnDimension: {
'default': {
autoSize: true
}
}
}%}
{# ... #}
{% endxlssheet %}
要为特定列定义它,请使用所需列的字母而不是 default
,例如 D 列:
To define it for a specific column, use the letter of the desired column instead of default
, per example the column D:
{% xlssheet 'Worksheet' {
columnDimension: {
'D': {
autoSize: true
}
}
}%}
{# ... #}
{% endxlssheet %}
这篇关于Twig Excel Bundle 自动调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文