var doc = app.activeDocument,
_pages = doc.pages, i, j, k, l,
_textframes, _tables, _row, _cell, rownum;
for (i = 0; i < _pages.length; i++) {
_tables = _pages.item(i).Tables;
for (j = 0; j < _tables.length; j++) {
_row = _tables.item(i).rows;
rowlen = _row.length;
for (k = 0; k < _row.length; k++) {
_cell = _row.item(i).cells;
for (l = 0; l < _cell.length; l++) {
_cell.item(i).appliedCellStyle = "CellA";
_cell.item(i).paragraphs.everyItem().appliedParagraphStyle = "ParA";
}
}
}
}
Hi, I am relatively new to Indesign scripting and I aim at writing a script that will format all cells of the table so I wrote one. But the above script only formats first cell of first row. The other problem is that it finds only one cel in each row.