[ESTK] Merge Two tables
Hi all,
Initially i have two tables in indesign, like below
Table 1:

Table 2:

I need to merge above tables the output is,

Please give any helps!!
thanks,
John.
Hi all,
Initially i have two tables in indesign, like below
Table 1:

Table 2:

I need to merge above tables the output is,

Please give any helps!!
thanks,
John.
Found this ancient one:
function merge_tables () {
var t = app.selection[0].parentStory.tables.everyItem().getElements();
var rows_to_move = 0;
for (var i = 1; i < t.length; i++)
rows_to_move += t.bodyRowCount;
var moved = 1;
var rows_length, cells_length, j, k;
for (var i = 1; i < t.length; i++)
{
rows_length = t.bodyRowCount;
for (j = 0; j < rows_length; j++)
{
pb.value = moved++;
t[0].rows.add ();
cells_length = t.rows
.cells.length; for (k = 0; k < cells_length; k++)
t.rows
.cells .texts[0].move ( LocationOptions.after, t[0].rows[-1].cells
.insertionPoints[0]); }
}
for (var i = t.length-1; i > 0; i--)
t.remove();
}
if (app.documents.length == 0 || app.selection.length == 0 || app.selection[0].tables.length == 0) {
alert ("Select a story or some text containing more than one table.")
exit()
}
merge_tables();
Peter
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.