【问题标题】:Twig Excel Bundle autosizeTwig Excel Bundle 自动调整大小
【发布时间】:2017-04-03 14:04:06
【问题描述】:

如何在 Twig Excel Bundle 中设置自动调整大小? https://twigexcelbundle.readthedocs.io/en/latest/

【问题讨论】:

标签: excel twig bundle autosize


【解决方案1】:

您可以通过columnDimension 将工作表的默认autoSize 属性设置为true

{% xlssheet 'Worksheet' {
    columnDimension: {
        'default': {
            autoSize: true
        }
    }
}%}
    {# ... #}
{% endxlssheet %}

要为特定列定义它,请使用所需列的字母而不是 default,例如 D 列:

{% xlssheet 'Worksheet' {
    columnDimension: {
        'D': {
            autoSize: true
        }
    }
}%}
    {# ... #}
{% endxlssheet %}

【讨论】:

  • 非常感谢!第二个例子帮助我。但首先没有工作=(
  • 奇怪,它来自文档...无论如何,很高兴它帮助了你!
猜你喜欢
  • 2018-08-16
  • 2021-11-25
  • 2018-02-06
  • 2015-03-13
  • 2013-12-16
  • 2015-06-16
  • 2011-04-02
  • 2013-07-16
  • 1970-01-01
相关资源
最近更新 更多