Forum


Replies: 12   Views: 4785
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 jc.021286  · 11-04-2013 - 12:13

Okay,
I've run into the same issue. Everything stopped working and I downloaded the source starting example and spent the last 12 hours trouble shooting this.

From the original
PHP Arrays are fine. Adjust the VAR_ITEM and VAR_PRICE values and everything populates fine.

In Word 2007.
Add more columns to the right and in the middle, add their respective variables names $VAR_TEST$, $VAR_TEST1$, ++ all work fine. Underscores and numbers seem to work just fine.

Added up to 8 columns, works fine.

Adjusted the table format, it carried forward almost perfectly. Table styles with alternating row colours do not take affect, the row after the header colour scheme will be applied throughout.

Adjust VAR_PRICE to anything else and it works fine.


Moment of truth, adjust VAR_ITEM to VAR_ITEMS... 1 row... *crap*
>>> Now for the fun part, remove the "S" with backspace so it now reads, VAR_ITEM.
>>>STILL DOES NOT WORK.... ???

Hit ctrl+z twice to make it go from VAR_ITEM > VAR_ITEMS > VAR_ITEM
>>>Test and it now works...


The gentleman who mentioned copy paste through notebook, you have my thanks.
As far as I noticed so far, only 1 column needs the correctly *notepaded* value to start the array off. The other columns follow suit without requiring to be *notepaded* (NP), (only tested with the leftmost starting column).
*** tested, at least 1 column variable needs to be NP.

Hope this helps some of you,
I do not have a lot of experience with xml, but I'll see if I cannot find it and see if a scrubber function is not viable.

jc