首页 > 解决方案 > phpword中具有动态行数的表

问题描述

是否可以创建具有动态行的表?

我需要创建一个基于数组的表,但我不知道启动时数组的大小。

我看到了这样的事情:

$templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor($myfqfilenamehere);
$tags = $templateProcessor->getVariables();
foreach($tags as $tag){
    $templateProcessor->setValue($tag, "a value here");
}

但我不知道它是否是我需要的。

标签: phprowsphpword

解决方案


推荐阅读