It is possible to add one row or a line of text at the end of a table in a document with many table?

Contributor ,
Jan 04, 2021

Copy link to clipboard

Copied

Or at least know the code to look at the end of a table and insert a line of text?

 

Thanks

Adobe Community Professional
Correct answer by Manan Joshi | Adobe Community Professional

Try the following

app.documents[0].stories.everyItem().tables.everyItem().rows.add(LocationOptions.AT_END).cells.everyItem().appliedCellStyle = "StyleName"

-Manan

 

TOPICS
How to

Views

93

Likes

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

It is possible to add one row or a line of text at the end of a table in a document with many table?

Contributor ,
Jan 04, 2021

Copy link to clipboard

Copied

Or at least know the code to look at the end of a table and insert a line of text?

 

Thanks

Adobe Community Professional
Correct answer by Manan Joshi | Adobe Community Professional

Try the following

app.documents[0].stories.everyItem().tables.everyItem().rows.add(LocationOptions.AT_END).cells.everyItem().appliedCellStyle = "StyleName"

-Manan

 

TOPICS
How to

Views

94

Likes

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
Jan 04, 2021 0
Adobe Community Professional ,
Jan 04, 2021

Copy link to clipboard

Copied

Can you elaborate a bit more, some screenshots might help to understand what you have and what you need. Also, is this is a scripting question(as you mentioned code)

-Manan

Likes

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
Reply
Loading...
Jan 04, 2021 1
Contributor ,
Jan 05, 2021

Copy link to clipboard

Copied

Manan, thanks.
The idea is to introduce the source for these tables and find a way like insert a new row.

Screen Shot 2021-01-05 at 9.12.01 AM.png

Likes

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
Reply
Loading...
Jan 05, 2021 0
Adobe Community Professional ,
Jan 05, 2021

Copy link to clipboard

Copied

You could have this be a row at the bottom of each table, and remove the strokes from the bottom, sides and middle of just that row.

Likes

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
Reply
Loading...
Jan 05, 2021 0
Contributor ,
Jan 05, 2021

Copy link to clipboard

Copied

Yes, but how to insert this additional row in a very large file?

 

One method is a script. If the new row has lines it doesn't matter. Just it is needed to have a new one at the bottom

The other one is to insert at the end of each table a paragraph return, not manually, supposing that ID has a delimiter. something like a «table break». With this return already created the copy-paste data will be very easy.

Likes

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
Reply
Loading...
Jan 05, 2021 0
Adobe Community Professional ,
Jan 05, 2021

Copy link to clipboard

Copied

See if the following script works

app.documents[0].stories.everyItem().tables.everyItem().rows.add(LocationOptions.AT_END)

-Manan

Likes

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
Reply
Loading...
Jan 05, 2021 0
Contributor ,
Jan 06, 2021

Copy link to clipboard

Copied

Fine! It worked.

Just an adenda:
it is possible to assign a ‘cell style’

 

Thanks for your time and reply.

 

Assign «Correct answer» is not working wityh this message:


Screen Shot 2021-01-06 at 10.29.51 AM.png

I will try later:

Likes

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
Reply
Loading...
Jan 06, 2021 0
Adobe Community Professional ,
Jan 07, 2021

Copy link to clipboard

Copied

Try the following

app.documents[0].stories.everyItem().tables.everyItem().rows.add(LocationOptions.AT_END).cells.everyItem().appliedCellStyle = "StyleName"

-Manan

 

Likes

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
Reply
Loading...
Jan 07, 2021 0
Contributor ,
Jan 07, 2021

Copy link to clipboard

Copied

Yes. It is fine. Thanks!

Likes

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
Reply
Loading...
Jan 07, 2021 0