Merge Tables Script

There’s no easy way to merge existing tables in InDesign. This simple script aims to rectify that problem.

To use the script:

  1. Download the script from here and install it.
  2. Select two tables.
  3. Run the script and select whether you’d like to merge below or merge beside.
    Merge Tables Dialog

That’s it!

Here’s a couple of examples of the script in use:

Two Tables

Two tables before merging them

Tables can be merged below:

Merged Below

as well as merged beside:

Merged Beside

The script can handle differing numbers of rows:

Unequal Rows

and adds blank cells as necessary:

Unequal Rows Merged

Similarly, it handles differing numbers of columns:

Unequal Columns

with similar results:

Unequal Columns Merged

Tags: , ,


  1. Greg says:

    Having a little problem. I cannot select two tables in InDesign CS5 for mac. I can select two text frames with tables, but not two tables. I cannot select two tables in the same text frame. I’ve held down every possible key combination.

    Please advise.

  2. Harbs says:

    You select tables using the text tool. Just select enough of the text that the tables reside in to highlight both tables, and it should work.

  3. Jean-Marc Lévy says:

    The first cell of the bottom table has been produced by merging cells. When I run the script, this cell is no more merged.
    Is it possible to avoid this?

  4. Olaf Nelson says:

    Is there a way to make it merge more than two tables? I have a document with probably hundreds of tables, each with 1 column and 2 rows. I want it all to become one table. Using this script I can only merge two tables at a time, even if I select more than two.

  5. Kaniu says:

    The script doesn’t work with cs6 right? Or do I miss something here?

  6. Yechiel Lebovits says:

    I used the script its wonderful. But when I made undo and then tried to use the script again it shows this error,

    JavaScript Error!

    Error Number: 30476
    Error String: Length

    Engine: main
    File C:\Program Files (x86)\Adobe\Adobe InDesign CS6\Scripts\Scripts Panel\My Scripts\MergeTables.jsx
    Line: 6
    Source: if(kAppVersion>=6){app.doScript(main, undefined , undefined,UndoModes.fastEntireScript,”Merge Tables”)}

    • Harbs says:

      Change this line:
      if(kAppVersion>=6){app.doScript(main, undefined , undefined,UndoModes.fastEntireScript,”Merge Tables”)}
      to this:
      if(kAppVersion>=6){app.doScript(main, undefined , undefined,UndoModes.ENTIRE_SCRIPT,”Merge Tables”)}

  7. aT says:

    this tool will only merge 2 tables.. is it possible to merge more than two tables on a page or better on whole document?

Leave feedback