Hello,
We have tested your HTML with the colspan value using the previous changes and it works correctly as well with MS Word and LibreOffice.
Please note that the code you have posted:
<table width="600">
<tr>
<td coldspan="2" width="100"></td> <!-- or width="600" is equal...-->
</tr>
<tr>
<td width="100"></td>
<td width="500"></td>
</tr>
</table>
isn't correct. It should be:
<table width="600">
<tr>
<td colspan="2" width="100"></td> <!-- or width="600" is equal...-->
</tr>
<tr>
<td width="100"></td>
<td width="500"></td>
</tr>
</table>
This is using colspan (not coldspan). You can use an auto value, or 100 or 600 as width in the td.
We have tested it using the following code:
$html = '
<table border="1" width="600">
<tr>
<td colspan="2" width="100">A</td>
</tr>
<tr>
<td width="100">B</td>
<td width="500">C</td>
</tr>
</table>';
$docx->embedHTML($html);
Regards.