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 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

TOPICS
How to

Views

150

Likes

translate

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 2 Correct Answers

Adobe Community Professional , Jan 05, 2021 Jan 05, 2021
See if the following script works app.documents[0].stories.everyItem().tables.everyItem().rows.add(LocationOptions.AT_END) -Manan

Likes

translate

Translate

Translate
Adobe Community Professional , Jan 07, 2021 Jan 07, 2021
Try the following app.documents[0].stories.everyItem().tables.everyItem().rows.add(LocationOptions.AT_END).cells.everyItem().appliedCellStyle = "StyleName" -Manan  

Likes

translate

Translate

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

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
Contributor ,
Jan 05, 2021 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

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

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
Contributor ,
Jan 05, 2021 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

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

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
Contributor ,
Jan 06, 2021 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

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

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
Contributor ,
Jan 07, 2021 Jan 07, 2021

Copy link to clipboard

Copied

Yes. It is fine. Thanks!

Likes

translate

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