当我添加到页眉或页脚表中时 - 我得到一列。
看起来在页眉/页脚中忽略了addRow()方法。
$phpWord = new \PhpOffice\PhpWord\PhpWord();
$section = $phpWord->addSection();
$header = $section->addHeader();
$table = $header->addTable(['columnWidths' => 200, 'borderColor' => '000000', 'borderWidth' => 5]);
$table->addRow(200);
$table->addCell(100)->addText("Col 1");
$table->addCell(100)->addText("Col 2");
$table->addRow(200);
$table->addCell(100)->addText("Col 1");
$table->addCell(100)->addText("Col 2");
那么为什么不在我的餐桌上工作呢?