Forum


Replies: 1   Views: 75
Phpword - how to combine 2 rows and 3 cells it table ?

Posted by developersvil  · 31-07-2019 - 22:51

$table->addRow();

$table->addCell(2000,  $cellRowSpan)->addText('1', null, $cellHCentered);
$table->addCell(2000,  $cellRowSpan)->addText('2', null, $cellHCentered);
$table->addCell(2000,  $cellRowSpan)->addText('3', null, $cellHCentered);

$table->addCell(2000, $cellVCentered)->addText('4', null, $cellHCentered);
$table->addCell(2000, $cellVCentered)->addText('5', null, $cellHCentered);
$table->addCell(2000, $cellVCentered)->addText('6', null, $cellHCentered);

$table->addRow();

$table->addCell(null, $cellRowContinue);
$table->addCell(null, $cellRowContinue);
$table->addCell(null, $cellRowContinue);

$table->addCell(2000, $cellVCentered)->addText('4', null, $cellHCentered);
$table->addCell(2000, $cellVCentered)->addText('5', null, $cellHCentered);
$table->addCell(2000, $cellVCentered)->addText('6', null, $cellHCentered);

 

Posted by admin  · 01-08-2019 - 06:14

Hello,

This forum is only for phpdocx questions and that code seems from phpword. Using phpdocx you can accomplish that task using addTable, embedHTML or DOCXPath, for other libraries please write in other forums.

Regards.