Skip to main content
Participant
November 14, 2016
Answered

Help with InDesign Tables • How to limit the number of characters in a cell?

  • November 14, 2016
  • 2 replies
  • 971 views

I'm placing a huge excel file into an InDesign table.  One of the columns contains descriptive text that tends to be excessive at times.  Often there is too much text to fit in the box and the text wraps around to the next line.

Is there a way I could automatically limit the number of characters in a cell and add a "..." if the description exceeds the set number of characters?

Example:

Instead of...

CodeDescriptionPriceCategory

TBS441218

Royal S4s Trimboard S/S - 4/4 (3/4’’) 1X12 ( 11 1/4’’) X 18’ - 100% cellular
PVC trimboard
$68.85Trim Moulding

Do...

CodeDescriptionPriceCategory
TBS441218Royal S4s Trimboard S/S - 4/4 (3/4’’) 1X12 ( 11 1/4’’) X 18’ - 100% cellular...$68.85Trim Moulding
This topic has been closed for replies.
Correct answer Scott Falkner

You could use GREP in Find/Change to replace any characters after a certain point with an ellipsis. This would be a Find/Change, not GREP Styles. I am a noob at GREP, but I am confident some help can be found. You want something like Everything after the first space after the first XX characters. To limit the search make sure you use a unique paragraph style for just the cells in Description.

2 replies

Scott Falkner
Community Expert
Scott FalknerCommunity ExpertCorrect answer
Community Expert
November 14, 2016

You could use GREP in Find/Change to replace any characters after a certain point with an ellipsis. This would be a Find/Change, not GREP Styles. I am a noob at GREP, but I am confident some help can be found. You want something like Everything after the first space after the first XX characters. To limit the search make sure you use a unique paragraph style for just the cells in Description.

shadeashAuthor
Participant
November 14, 2016

Thanks, Scott.

Sounds like that is exactly what I want to accomplish.  Any GREP pros can tell me what the formula would be?  I assume I would need a disappear character style for everything after the cutoff point.

Community Expert
November 15, 2016

Hi,

part one of your problem could be solved with two nested styles defined with your paragraph style:

Nested style 1:
[None] over xx Characters

Nested style 2:
Invisible until End of Nested Style Character

[None] and Invisible are character styles.

Invisible is defined with:

1. Fill color: "None"

2. Stroke color: "None"

3. Point Size: 0.1
4. Scaling: 1%

That would make all characters after character xx invisible.


The contents is still there and could be made available by changing the applied paragraph style.
Or by using the Story Editor window.

For part two I have no answer but scripting:

You need an ellipsis at the end of the visible text.

And perhaps you would not like to start the invisible text in the middle of a word.

Or in the middle of a syllable…

Regards,
Uwe

Willi Adelberger
Community Expert
Community Expert
November 14, 2016

No, there is not such a function in InDesign. You could do it in MS Excel to truncate content of a cell and import that.

Make another sheet in Excel with its text functionality where each cell has to draw the values from the other one automatically, truncate it in that sheet and import it to InDesign.