24 Replies Latest reply on Oct 11, 2015 4:25 AM by Obi-wan Kenobi

    Cell style alternative rows

    Level 1

      I needs to Apply cell style for alternative row in all tables. But the below code is not applying properly how to fix this issue

      var doc = app.activeDocument, 

          _tables = doc.stories.everyItem().tables.everyItem().getElements(); 

       

      for(var i =0;i<_tables.length;i++) 

              var _rows = _tables[i].rows; 

              for(var j=2;j<_rows.length;j+=2) 

              { 

                        _rows[j].cells.everyItem().appliedCellStyle = "TableBody1";

       

       

                  } 

          } 

      Table.PNG