【问题标题】:Generate table columns using m2doc使用 m2doc 生成表列
【发布时间】:2018-07-18 22:15:40
【问题描述】:

我想知道是否可以使用 m2doc 生成表的列。

目前,我可以通过这样做来生成表格的行:

{m:for r|rows} 
[] [] []
{m:endfor}

,其中 [][][] 表示具有 3 列的静态表。

除此之外,我想在静态表上动态添加列。所以,我会假设这样的事情可以工作:

{m:for r|rows} 
[] [] [] {m:for s|cells} *tableCell*{m:endfor}
{m:endfor}

但是,我无法水平生成单元格,因为表达式 {m:for s|cells} *tableCell*{m:endfor} 无法在 word 文档的同一行中格式化。因此,在 word 文档中它显示为:

{m:for s|cells}                                    *tableCell*
   {m:endfor}

,这导致垂直生成的列。

有人遇到过同样的问题吗?有解决办法吗?

【问题讨论】:

    标签: m2doc


    【解决方案1】:

    您可以创建一个返回MTableservice,并以编程方式创建表。目前只能在MTable 的单元格中插入文本。你可以看看sample table test,服务实现在MTableTestServices

    【讨论】:

      猜你喜欢
      • 2021-02-12
      • 2021-10-23
      • 2019-10-26
      • 2019-08-19
      • 1970-01-01
      • 2023-01-31
      • 1970-01-01
      • 2020-11-17
      • 2021-04-11
      相关资源
      最近更新 更多