There’s no easy way to merge existing tables in InDesign. This simple script aims to rectify that problem.
To use the script:
- Download the script from here and install it.
- Select two tables.
- Run the script and select whether you’d like to merge below or merge beside.
That’s it!
Here’s a couple of examples of the script in use:
Two tables before merging them
Tables can be merged below:
as well as merged beside:
The script can handle differing numbers of rows:
and adds blank cells as necessary:
Similarly, it handles differing numbers of columns:
with similar results:
Tags:
InDesign,
Scripts,
tables
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.
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.
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?
Thanks.
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.
Thanks.
Good idea. I don’t know when I’m going to have the time to get to it though…
The script doesn’t work with cs6 right? Or do I miss something here?
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”)}
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”)}
Hi,
this tool will only merge 2 tables.. is it possible to merge more than two tables on a page or better on whole document?