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

Table formatting script

New Here ,
Jun 14, 2022 Jun 14, 2022

Good day all,

 

Seeing so many helpful people and scripts in this forum, I thought I would ask for help.

 

Where could I find a script that can perform several tasks on a table?

I want the ability to do the following to a/several table(s)

• apply a paragraph style

• apply a table style

• apply a cell style to all cells

then

• apply a cell style to the top row only + align the text to the bottom of the cell

• apply another cell style to the bottom row

 

I would like the ability to

click nowhere and have the script run on the enritre document

click on/in a text box and have the script run on the tables in that text box (and the ones on the following pages)

click on/in a specific table and have the script run only on that table

 

Does such a thing exist?

 

Thank you,

 

Stephane

TOPICS
Scripting
585
Translate
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 ,
Jun 14, 2022 Jun 14, 2022

Table style setting items include paragraph styles and cell styles to be applied.
You can also set individual cell styles only for header rows.
Thus, I suspect that applying the table style is all that is needed.

Translate
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
New Here ,
Jun 15, 2022 Jun 15, 2022
LATEST
Hello.

Is this was my computer that is exactly what I would do. Sadly I have to use templates already created and we are not allowed to modify anything. My only resort is scripts, otherwise everything has to be done manually one table, column, cell at a time...

Thanks.

Stéphane
Translate
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 ,
Jun 15, 2022 Jun 15, 2022

Hi @Stephanemaestro, what is your scripting level? Have you made a start? Scripting tables is complicated at first, but when you come to terms with it, you can do a lot. Defnitely everything you ask. Otherwise, we will see if anyone has a ready-made script that might help.

- Mark

Translate
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
New Here ,
Jun 15, 2022 Jun 15, 2022
Hi Mark,

Thanks for your reply.

I have no scripting experience. Never needed it before, but this new jobs, styles are set and nothing can be modified, so I have to resort to scripts to automate some things.

If something already existed that would be great.

Thanks.

Stéphane
Translate
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 ,
Jun 15, 2022 Jun 15, 2022

Yes, it definitely exists, I frequently use both of them.

Comment from @m1b is also definitely accurate. You need to learn a bit of scripting in order to customize the script and make it work as you want. Not that much complicated when you just have to customize the names though. 

 

Before sharing the script, I would need some answers:
- Are all the table based on the same structure, in terms of number of columns/ rows/ witdth ? 

- Do you use Headers/ Footers ?

 

Best

Fred

Translate
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