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

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

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

401

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

Community Expert , 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

Votes

Translate

Translate
Community Expert , 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

 

Votes

Translate

Translate
Community Expert ,
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

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

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

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
Engaged ,
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.

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

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
Engaged ,
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:

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

 

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

Copy link to clipboard

Copied

LATEST

Yes. It is fine. Thanks!

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