Skip to main content
Participant
Mar 30, 2026 6:01 AM UTC
Question

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

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
Mar 30, 2026 8:52 AM UTC

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.

Translate