Forum


Replies: 1   Views: 1366
Html table with colspans
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 sandeepguntaka  · 14-06-2021 - 15:11

Hi,

I am trying to generate a table from html 

<?php
require_once '../../../Classes/Phpdocx/Create/CreateDocx.php';
$docx = new Phpdocx\Create\CreateDocx();
$html = '<table>
<tbody>
<tr>
<th>AAAAA</th>
<th>BBBBB</th>
<th>CCCCC</th>
<th>DDDDD</th>
</tr>
<tr>
<td colspan="3">111111</td>
<td>EEEEEE</td>
</tr>
<tr>
<td colspan="3">222222</td>
<td>FFFFFF</td>
</tr>
</tbody>
</table>';
$docx->embedHTML($html);
$docx->createDocx('example_embedHTML_1');

But the generated word ducument has a table with only 3 columns and rows with extra height.

https://ibb.co/GTpJg76

I am using a premium licence.

Is this issue already reported? I would like know the fix. Can someone help?