Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

With script, How to duplicate header rows that have "cross rows and columns"?

Guide ,
Jul 17, 2025 Jul 17, 2025

The original script doesn't seem to work anymore?

function dupeTopRow(t){
    var newRow = t.rows.add(LocationOptions.BEFORE, t.rows[0]);
    var newCell = newRow.cells
    var lr = t.rows[1].cells
    for (var i = 0; i < newCell.length; i++){
        newCell[i].properties = lr[i].properties;
    };  
}

 

across.png

TOPICS
Scripting
723
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 26, 2025 Aug 26, 2025

I don’t see a convertToRowType() method in the API

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Aug 26, 2025 Aug 26, 2025

@rob day 

Here, m1b updated on 8/26, and I had no idea.
Good thing you asked—I just checked the old posts.
Unbelievable, he updated. m1b is truly amazing.
https://community.adobe.com/t5/indesign-discussions/extendscript-how-to-convert-selected-table-rows-...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Aug 27, 2025 Aug 27, 2025
LATEST

Edit 2025-07-19: added check for undefined cells in getRows function.

This version seems to have a lot of errors.
I don't know what version mine is, but it's actually correct.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines