I have this code:
$styleTable = array('borderSize' => 1, 'borderColor' => '000000' ,'align' => 'center');
$cellRowSpan = array('vMerge' => 'restart', 'valign' => 'center', 'bgColor' => 'FFFFFF');
$cellRowContinue = array('vMerge' => 'continue');
$cellHCentered = array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER);
$cellVCentered = array('valign' => 'center');
$documento->addTableStyle('Colspan Rows', $styleTable);
$table = $seccion->addTable('Colspan Rows');
$table->addRow();
$table->addCell(1000, $cellRowSpan)->addText(htmlspecialchars('A'), null, $cellHCentered);
$table->addCell(8000, $cellVCentered)->addText(htmlspecialchars('TEXTO 1'),
array('name' => 'Calibri','size' => '14','bold' => true), $cellHCentered);
$table->addCell(1000, $cellRowSpan)->addText(htmlspecialchars('E'), null, $cellHCentered);
$table->addRow();
$table->addCell(null, $cellRowContinue);
$table->addCell(8000, $cellVCentered)->addText(htmlspecialchars('TEXTO 2'),
array('name' => 'Calibri','size' => '14','bold' => true), $cellHCentered);
$table->addCell(null, $cellRowContinue);
That code generates the following table in a word document.
As you can see the text that is inside the cells is not centered and what I need is that it be see like this
How can I do to center the text?