I’m trying to get text after a certain word appears in a table to write back into an Excel spread sheet, but the word is in the next column and in a different row, which will change with each instance.
E.g. the selector I want for the certain word is:
<*webctrl tag=‘TABLE’ />
<*webctrl tableCol=‘2’ tableRow=‘7’ tag=‘TD’ />
and the word I want to find is in:
<*webctrl tag=‘TABLE’ />
<*webctrl isleaf=‘1’ tableCol=‘5’ tableRow=‘6’ tag=‘TD’ />
On another example, the selector for the certain word is:
<*webctrl tag=‘TABLE’ />
<*webctrl tableCol=‘2’ tableRow=‘23’ tag=‘TD’ />
and the word I want to find is:
<*webctrl tag=‘TABLE’ />
<*webctrl isleaf=‘1’ tableCol=‘5’ tableRow=‘22’ tag=‘TD’ />
(minus the *'s otherwise it wouldn’t show up)
So basically what I’m asking is, is there a way for there to be an anchor or something similar for a word, and for you to then get the text which will always be the same position away from it, for it to then write back to Excel?
I’ve posted two examples, both in a different colour. Each “tableCol” is a word that I’ve had to blank out (the ones on the left hand side are where the dates are) but I’ve put the column number on there for information. The tableRow at the side is for all of the ones on that row, and they all begin with "isleaf=“1"” but I didn’t have the room to add it on.
Hope this makes sense, please let me know if anything else is needed.