Forum


Replies: 12   Views: 4746
Addtemplatevariable only creates first row of 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 lbreu  · 11-04-2013 - 12:13

OK, yet another self reply ;)

Did some more tests, it looks like the autocorrect may be messing things up. I guess it's open source and I could fix it, but since I am paying for it, I hope you guys may be able to address this in a patch at some point ;) Or maybe I am just doing it wrong???

Here a snippet from OpenOffice which works:

[code]
<w:tr>
<w:trPr>
<w:cantSplit w:val="false"/>
</w:trPr>
<w:tc>
<w:tcPr>
<w:tcW w:type="dxa" w:w="4819"/>
<w:tcBorders>
<w:left w:color="000000" w:space="0" w:sz="2" w:val="single"/>
<w:bottom w:color="000000" w:space="0" w:sz="2" w:val="single"/>
</w:tcBorders>
<w:shd w:fill="auto" w:val="clear"/>
<w:tcMar>
<w:top w:type="dxa" w:w="55"/>
<w:left w:type="dxa" w:w="55"/>
<w:bottom w:type="dxa" w:w="55"/>
<w:right w:type="dxa" w:w="55"/>
</w:tcMar>
</w:tcPr>
<w:p>
<w:pPr>
<w:pStyle w:val="style20"/>
</w:pPr>
<w:r>
<w:rPr></w:rPr>
<w:t>$termin.datum$</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:type="dxa" w:w="4819"/>
<w:tcBorders>
<w:left w:color="000000" w:space="0" w:sz="2" w:val="single"/>
<w:bottom w:color="000000" w:space="0" w:sz="2" w:val="single"/>
<w:right w:color="000000" w:space="0" w:sz="2" w:val="single"/>
</w:tcBorders>
<w:shd w:fill="auto" w:val="clear"/>
<w:tcMar>
<w:top w:type="dxa" w:w="55"/>
<w:left w:type="dxa" w:w="55"/>
<w:bottom w:type="dxa" w:w="55"/>
<w:right w:type="dxa" w:w="55"/>
</w:tcMar>
</w:tcPr>
<w:p>
<w:pPr>
<w:pStyle w:val="style20"/>
</w:pPr>
<w:r>
<w:rPr></w:rPr>
<w:t>$termin.beschreibung$</w:t>
</w:r>
</w:p>
</w:tc>
</w:tr>
[/code]


and here the same table row structure with an unmodified, untampered with, unsuperconfigured out-of-the-box Word 2007 which doesn't (only first row of data is output):


[code]
<w:tr w:rsidR="001F161E" w:rsidTr="001F161E">
<w:tc>
<w:tcPr>
<w:tcW w:w="4606" w:type="dxa"/>
</w:tcPr>
<w:p w:rsidR="001F161E" w:rsidRDefault="001F161E">
<w:r>
<w:t>$</w:t>
</w:r>
<w:proofErr w:type="spellStart"/>
<w:r>
<w:t>termin.datum</w:t>
</w:r>
<w:proofErr w:type="spellEnd"/>
<w:r>
<w:t>$</w:t>
</w:r>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w="4606" w:type="dxa"/>
</w:tcPr>
<w:p w:rsidR="001F161E" w:rsidRDefault="001F161E">
<w:r>
<w:t>$</w:t>
</w:r>
<w:proofErr w:type="spellStart"/>
<w:r>
<w:t>termin.beschreibung</w:t>
</w:r>
<w:proofErr w:type="spellEnd"/>
<w:r>
<w:t>$</w:t>
</w:r>
</w:p>
</w:tc>
</w:tr>
[/code]