3

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?

1

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:

enter image description here

  • OMG!!!!! THANK YOU SOOOOOOOOO MUCH!!! Even though your video was in French, it helped me figure out a solution!!!!! If only I had seen it yesterday..... before I went in and manually corrected 5,232 addresses!? Thanks again for your genius!!!! – Bonnie Feb 13 '18 at 19:54
  • I need help, i can't read the French!!!! Thank you in advance!!! – Shawn Brandt Feb 1 at 21:14
  • @ShawnBrandt The video shows dialog boxes from data merge, paragraph style options and character style. Typically the order of the various elements is the same whether using English or French so it should be fairly straight forward if you refer to the software. Do you need help with a specific part? – curious Feb 2 at 2:48
0

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

  • I'm not trying to remove a blank line, I'm basically trying to remove a double space when the name doesn't contain a middle name or initial. – Bonnie Feb 13 '18 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.