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

Script to align text in Table

Participant ,
Oct 30, 2019 Oct 30, 2019

Is there any way or script where I can right-align the text within the cell of a table but the text should be exact horizontally center to the cell, please help

TOPICS
Scripting
874
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 ,
Oct 30, 2019 Oct 30, 2019

 

Could you post a screenshot of what you need? You should be able to Right-Align text within cells and set the cell alignment to Centered using the built-in functions, as in the screenshot below.

Screen Shot 2019-10-30 at 1.02.15 PM.pngexpand image

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 ,
Oct 30, 2019 Oct 30, 2019

As you can see from Brian's screenshot all cells of the table are selected.

To do that:

1. Select some text in one cell.

2. Hit ESC key, that will select that cell.

2. Do Select All, that will select all cells in the table.

 

Then adjust your values for text alignment and center position.

 

What can go wrong?

 

Cells with different inset values.

Text formatting like:

Align baseline of text to baseline grid.

Baseline shift of text.

 

TableCells-DifferentInsets-DifferentTextFormatting.PNGexpand image

 

Regards,
Uwe Laubender

( ACP )

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 ,
Oct 30, 2019 Oct 30, 2019
LATEST

Excellent points, Uwe. Another potential culprit to throwing off the horizontal align would be an extra return carriage at the end of the text. 

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