Forum


Replies: 4   Views: 2169
How to get elements of a specific table.
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 neu_katayama  · 22-07-2019 - 02:08

-<w:tbl>
  -<w:tblPr>
    <w:tblStyle w:val="TABLECUSTOMSTYLE"/>
    <w:tblW w:w="0" w:type="auto"/>
    <w:tblInd w:w="0" w:type="dxa"/>
    <w:tblLook w:val="04A0" w:noVBand="1" w:noHBand="0" w:lastColumn="0" w:firstColumn="1" w:lastRow="0" w:firstRow="1"/>
  </w:tblPr>
  <w:tblGrid>
    <w:gridCol w:w="10763"/>
  </w:tblGrid>
  -<w:tr w:rsidR="008E34E6" w14:textId="77777777" w14:paraId="57D2E49F" w:rsidTr="008E34E6">
    +<w:tc>
  </w:tr>
</w:tbl>

I want to get the value of w: tc in wordML above.

I want to determine by table style etc. How should I specifically set [referenceNode]?

Please let me know if there is another good way.

 

$ref = array(
 'type' => 'table',
 'attributes' => array("w:val" => "TABLECUSTOMSTYLE"),
);

$now_content = $now_docx->getWordContents($ref);