Mobile app version of vmapp.org
Login or Join
Odierno310

: How to auto delete a space left after a data merge in InDesign? I have an InDesign document which is filled from the data in a CSV file using data merge. The CSV has columns for First Name,

@Odierno310

Posted in: #AdobeIndesign #DataMerge #MicrosoftExcel

I have an InDesign document which is filled from the data in a CSV file using data merge. The CSV has columns for First Name, Middle Name & Last Name, but some of the data in the CSV isn't filled in - such as Middle Name if the person doesn't have one. InDesign then leaves a physical space when the middle name is missing which is putting a double space between the first and last name when I merge the data. Is there any way to get InDesign to ignore blank cells in the CSV file?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Odierno310

2 Comments

Sorted by latest first Latest Oldest Best

 

@Phylliss782

Are you sure those spaces exist in your CSV file? They shouldn't.
Did you not manually added the spaces between the fields?
Like this: (dots represent spaces)

<<Firstname>>.<<Middlename>>.<<Lastname>>


It does make sense since you want a space between fields.
A solution (among many possible ones) is to use a grep style to hide a space if followed by another space. Something like this should do the trick:

h(?=h)


To create an invisible character style, you can use these settings ("Invisible character style" is just like pancakes: everyone has his own recipe... here's mine ^ ^):
color : [none]
size: 0.1 pt
Tracking: -1000
horizontal scale: 1%

See example below:

10% popularity Vote Up Vote Down


 

@Goswami567

In the Data Merge menu, choose "Content Placement Options", and select "Remove Blank Lines for Empty Fields", then click "OK" - it should work.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme