Forum


Replies: 12   Views: 356
Column removal
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 fairshareitservices  · 17-06-2024 - 10:23

I have the below code to remove cell contents in php. 

 $referenceNodeSIP = array(

        'customQuery' => '//w:tr/w:tc[contains(., "${remove_sipcol}")]',    

    );                  

    $docx->removeWordContent($referenceNodeSIP);

 

    //below code is to remove cells of header of second portfolio table that don't have values

  $referenceNodePortfolio = array(

        'customQuery' => '//w:tr/w:tc[contains(., "${remove_portfolio_tbl}")]',    

    );                  

    $docx->removeWordContent($referenceNodePortfolio); 

When i run this code it runs and generates an output file. But when I try to open output file it doesn't get open. Got an error 'Word experienced an error trying to open the file. Try these suggestions
1. Check the file permission

2. Check the sufficient free memory

And values of the cell are set before calling the function where above code resides