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

Is this possible by adding alternative empty columns in indesign tables by indesign scripts?

Participant ,
Oct 26, 2018 Oct 26, 2018

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

TOPICS
Scripting

Views

554

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Oct 29, 2018 Oct 29, 2018

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.

Screen Shot 2018-10-29 at 4.28.08 pm.png

After code execution, columns inserted after all except the first one. Now tell what is needed.

Screen Shot 2018-10-29 at 4.37.03 pm.png

-Manan

Votes

Translate

Translate
Community Expert ,
Oct 27, 2018 Oct 27, 2018

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

Votes

Translate

Translate

Report

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
Participant ,
Oct 28, 2018 Oct 28, 2018

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

Votes

Translate

Translate

Report

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 ,
Oct 28, 2018 Oct 28, 2018

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.

Votes

Translate

Translate

Report

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
Participant ,
Oct 29, 2018 Oct 29, 2018

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

Votes

Translate

Translate

Report

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 ,
Oct 29, 2018 Oct 29, 2018

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.

Screen Shot 2018-10-29 at 4.28.08 pm.png

After code execution, columns inserted after all except the first one. Now tell what is needed.

Screen Shot 2018-10-29 at 4.37.03 pm.png

-Manan

Votes

Translate

Translate

Report

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
Participant ,
Oct 29, 2018 Oct 29, 2018

Copy link to clipboard

Copied

LATEST

Yes, I got it. Thanks.

by

Hasvi

Votes

Translate

Translate

Report

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