element instanceof \PhpOffice\PhpWord\Element\Table) { return ''; } $content = ''; $rows = $this->element->getRows(); $rowCount = count($rows); if ($rowCount > 0) { $content .= '' . PHP_EOL; foreach ($rows as $row) { /** @var $row \PhpOffice\PhpWord\Element\Row Type hint */ $rowStyle = $row->getStyle(); // $height = $row->getHeight(); $tblHeader = $rowStyle->isTblHeader(); $content .= '' . PHP_EOL; foreach ($row->getCells() as $cell) { $writer = new Container($this->parentWriter, $cell); $cellTag = $tblHeader ? 'th' : 'td'; $content .= "<{$cellTag}>" . PHP_EOL; $content .= $writer->write(); $content .= "" . PHP_EOL; } $content .= '' . PHP_EOL; } $content .= '
' . PHP_EOL; } return $content; } }