Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

Adding row at a table in indesign CS6 from javascript

$
0
0

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?


Viewing all articles
Browse latest Browse all 15932

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>