Copy link to clipboard
Copied
Hi,
My indesign file contains more tables and my task is want to add alternative empty columns in indesign tables. Please guide me is this possible by indesign scripts?
Before:
After:
Thanks in advance.
by
hasvi
Hi Hasvi,
See the screenshot of what i start with and what i get once i do the changes i mentioned in the latest post.
After code execution, columns inserted after all except the first one. Now tell what is needed.
-Manan
Copy link to clipboard
Copied
Yes that is very much possible, select your table and run the following script
var t = app.selection[0]
var columnLen = t.columns.length
for(var i = columnLen - 1; i >= 0 ; i--)
t.columns.add(LocationOptions.AFTER, t.columns)
-Manan
Copy link to clipboard
Copied
hi,
It's working fine, but want to insert except 1st column in table. If possible guide me.
thanks
hasvi
Copy link to clipboard
Copied
Do you want to say that every column should be followed by an empty column that we insert except the first one? If it is so then change the for loop condition to i > 0.
Copy link to clipboard
Copied
Hi,
It works fine for except the last one, but my result should be except the first column.
by
hasvi
Copy link to clipboard
Copied
Hi Hasvi,
See the screenshot of what i start with and what i get once i do the changes i mentioned in the latest post.
After code execution, columns inserted after all except the first one. Now tell what is needed.
-Manan
Copy link to clipboard
Copied
Yes, I got it. Thanks.
by
Hasvi