Forum


Replies: 1   Views: 342
Table last column option
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 s.montanarella  · 28-10-2021 - 15:42

Hi' all,

I've different tables, one of them needs to active "Last column" option in "Table Tools Design". Is it possible to activate this option from phpdocx?

 

Posted by admin  · 28-10-2021 - 16:01

Hello,

If you are creating the tables using the addTable method you can use the following option:

*  'conditionalFormatting' (array) with the following keys and values:
     *      'firstRow' (bool) first table row conditional formatting
     *      'lastRow' (bool) last table row conditional formatting
     *      'firstCol' (bool) first table column conditional formatting
     *      'lastCol' (bool) last table column conditional formatting
     *      'noHBand' (bool) do not apply row banding conditional formatting
     *      'noVBand' (bool) do not apply column banding conditional formatting

If you need to change existing tables in a DOCX you can use DOCXCustomizer setting the customAttributes option applied to the w:tblLook tag and the w:lastColumn attribute (or w:val if the DOCX has been created with the 2003 old standard).

Regards.