Forum


Replies: 3   Views: 500
Table cell spacing adding empty cells
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 admin  · 13-10-2022 - 13:58

Hello,

The dev team has generated a patch in the testing branch. Although it's currently being tested before including it in the stable branch, it can suit your needs without adding empty blank spaces as explained in our previous reply.

Please edit the HTMLWordML.php file and go to the repairWordML method. In this method, replace the following line:

$data = str_replace('</w:tcPr></w:tc>', '</w:tcPr><w:p /></w:tc>', $data);

with:

$data = str_replace('</w:tcPr></w:tc>', '</w:tcPr><w:p><w:pPr><w:spacing w:after="0" w:before="0" w:line="240" w:lineRule="auto"/></w:pPr></w:p></w:tc>', $data);

Regards.