Skip to main content
This topic has been closed for replies.
Correct answer nandhinin87775610

Thanks all for your replies and suggestions.. and sorry for late reply..

there is no more options to use other applications.. the user wants to place the result as a table in illustrator... So I have created table using rectangles.. like,

x=0;

y=0;

w=100;

h=30;

for(y=0;y<2;y++){

    x = 0;

    for(x=0;x<2;x++){

        var rectRef = targetLayer.pathItems.rectangle(y,x,w,h);           

        var areaTextRef =targetLayer.textFrames.areaText(rectRef);      

        areaTextRef.contents ="content";

        x = x+w;

        }

        y = y - h;

}

5 replies

nandhinin87775610AuthorCorrect answer
Inspiring
June 11, 2018

Thanks all for your replies and suggestions.. and sorry for late reply..

there is no more options to use other applications.. the user wants to place the result as a table in illustrator... So I have created table using rectangles.. like,

x=0;

y=0;

w=100;

h=30;

for(y=0;y<2;y++){

    x = 0;

    for(x=0;x<2;x++){

        var rectRef = targetLayer.pathItems.rectangle(y,x,w,h);           

        var areaTextRef =targetLayer.textFrames.areaText(rectRef);      

        areaTextRef.contents ="content";

        x = x+w;

        }

        y = y - h;

}

chanaart
Community Expert
Community Expert
June 9, 2018

You cannot create table in Illustrator. You can do it in Indesign!

Chana

kphotopage
Legend
June 8, 2018

@ Jacob

So funny . . .  glad I did not have a mouth full of coffee.

Agree with Test Screen.

InDesign is the application to use!

Illustrator does NOT have Tables.

Long ago I had to totally recreate a given “Faux Table” created by an Illustrator user, .ai file.

GOOD GRIEF!

Editors wanted many changes.

Can do. Used InDesign.

My invoice later eased that royal pain.

K

Inspiring
June 7, 2018

Thanks for ur reply..

but i want to place the contents as a table in illustrator using script

Monika Gause
Community Expert
Community Expert
June 7, 2018

Please be more precise.

Which content?

How should the result look like?

Inspiring
June 7, 2018

It should look like a table for example,

col1  col2

xxx    xxx

xx      xx

i am getting some result as a hash/object like (key,value) after running the script..

i want to show that content as a table in illustrator document..

name1     name2

key          value

i know we could not create table in illustrator.. but is there any other option for create graphic element as a table?

Monika Gause
Community Expert
Community Expert
June 7, 2018

Which table?

You can't create tables in Illustrator.