如何在 PHPPresentation 中合并 table 中的单元格

How to merge cells in a table in PHPPresentation

我正在尝试使用 PHPPresentation 合并 table 中的单元格,但我没有找到任何方法,我该怎么做? 提前致谢。

这个问题比较老,但是回答可以帮助到其他人。 使用PHPPresentation合并单元格,我们可以依赖以下方法:

Cell class.

的 setRowSpan() 和 setColSpan()

示例:

$cell = $row->nextCell();
$cell->setColSpan(3);