Skip to main content
Participant
March 30, 2026
Question

Clearing overridden table cells using script causes losing paragraph styles in indesign 2025 (20.5.1) & 2026 (21.0)

  • March 30, 2026
  • 1 reply
  • 25 views

Hi,

 

var myTables = myDoc.stories.everyItem().tables.everyItem().getElements()

 

for (var j = 0; j < myTables.length; j++) {

var myTable = myTables[j];

 

var cells = myTable.cells.everyItem().getElements();

 

for (var c = 0; c < cells.length; c++) {

try {

cells[c].clearCellStyleOverrides(true);

} catch (e) { }

}

}

 

While trying to clear the cell overrides across the tables, the paragraph styles are lost and applied as [Basic Paragraph] style.

I’m currently using the indesign 2025 (20.5.1) & 2026 (21.0). Any suggestions?

Thanks in Advance!

Ashrafali R.

1 reply

yopplescript
Participating Frequently
March 30, 2026

Excuse me for writing here.

If you apply a paragraph style to the text in a cell via the Paragraph Styles panel alone, the style will be lost when the cell style is overridden.

Please try specifying the paragraph style to be used within the Cell Style options.