2 Replies Latest reply on Nov 25, 2011 2:39 AM by sandu_aurel

    table draw!

    sandu_aurel

      Hello,

      How can I draw a table using scripts?

      Note that my table may have spanned rows and/or columns!

       

      Many thanks,

      Aurel

        • 1. Re: table draw!
          Laubender Adobe Community Professional & MVP

          @Aurel:
          JavaScript: basically by adding a table object to an insertionPoint of a text frame or a story.

           

          If you have selected an empty text frame:

           

          var myTable = app.selection[0].insertionPoints[0].tables.add();
          

           

          Then add columns (4) and rows (10) to the table:

           

          myTable.columnCount = 4; //Limit: 200
          myTable.bodyRowCount = 10 //Limit: 10.000 ???
          

           

          This table will span the whole text frame, all four columns evenly devided.

           

          For more properties and methods for text frames, insertionPoints, tables, columns, rows and cells see Jongware's excellent documentation of the DOM:

           

          http://www.jongware.com/idjshelp.html

           

          Uwe

          • 2. Re: table draw!
            sandu_aurel Level 1

            Many thanks!