Forum


Replies: 1   Views: 4062
Phpword - how to combine 2 rows and 3 cells it table ?
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

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.