This is not the best approach. Don't start at the top with tables; start at the bottom with the contents of the cell and what you want to do with it. Cells contain paragraphs. Put your cursor in a paragraph and start with this code:
#target framemaker var doc, pgf; doc = app.ActiveDoc; pgf = doc.TextSelection.beg.obj;
OK, what do you need to do with the paragraph? Are you collected information, changing things, etc.?