I have a table in my indesign page.It has one column and several rows. I want to add a row at the begining of the table and add some text content to it.
I tried some provided code but none have worked.
This is how i reference the table object.
var mytable =myPage.textFrames.item(0).tables.item(0);
I tried each the following but none worked and gave an error
mytable.rows[0].cells[0].insertionPoints[0].contents = "TEST TEST";
mytable.rows.add( LocationOptions.AFTER, mytable.rows[-1] );
mytable.rows.add( LocationOptions.Before, mytable.rows[0] );
What should i do?