【发布时间】:2020-05-18 08:03:36
【问题描述】:
我正在尝试在 html 中的表格中添加边框。下面是我的代码
$phpWord = new \PhpOffice\PhpWord\PhpWord();
$section = $phpWord->addSection();
$html = "<table border='1'>
<tr>
<th>name</th>
</tr>
<tr><td>John</td></tr>
</table>";
\PhpOffice\PhpWord\Shared\Html::addHtml($section, $html );
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment;filename="test.docx"');
$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007');
$objWriter->save('php://output');
我已经分配了 1 的边框,但它没有工作。我的桌子上没有边框
添加样式后,it 事件不起作用。请帮忙
【问题讨论】: