Copy link to clipboard
Copied
I'm merging a CSV file for envelope addressing. I am choosing the "Remove Blank Lines". They are not being removed. This began when I upgraded to CC 2018, never had this issue before and been merging data for years.
I figured it out: the tagged fields <<ContactAddress2>> need Paragraph endings (NOT Soft Line Endings).
When an optional <<ContactAddress2>> field is empty, and after it is properly removed, a Soft Line Ending (which is in fact a line feed character, 0x0A, I think is still there.
After entering Paragraph breaks at the end of each field, select all of the tags and adjust the end of paragraph spacing to zero. That makes optional tagged fields optional... and <<ContactAddress2>> collapses to nothin
...Copy link to clipboard
Copied
Hi katherinereece,
Please have a look at below-mentioned links:
https://indesignsecrets.com/rid-empty-lines-data-merge.php
Data Merge - will not Remove Blank Lines?
The ''Remove blank lines when empty'' Data Merge option does not work consistently in InDesign CS4
Hope this helps!
Regards
Srishti
Copy link to clipboard
Copied
I am unable to replicate this issue using Mac OS version of InDesign CC (2018) (build 13.0.1), with Remove Blank Lines for Empty Fields option enabled in Data Merge.
Have you tried opening the .CSV file with the empty fields in a text editor (e.g. NotePad++, TextEdit)? Once opened look for the problem 'empty' fields, and check if there's a space or other strange hidden character in it.
,,
In the end the issue was related to the CSV file itself.
Copy link to clipboard
Copied
As Cari said (and Srishti linked to), others have had issues with something actually being in the csv file fields. Turning on hidden characters in InDesign might reveal the culprit. Also, it may be in your InDesign setup itself. Others have had issues with tab characters, rogue whitespace characters, or soft returns. Turning on those hidden characters might give you a little insight...then you'll need to track down where the culprit is being introduced. If you can post an actual sample, someone might be able to track it down, too.
Copy link to clipboard
Copied
I am struggling with someting like this too, and can't explain it.
My csv file is: UTF-8 Unicode (with BOM) text, with CRLF line terminators, and I've set UTF-8, PC as the datasource (PC generates both cr & lf line ends). I've also tried with the .csv file set as Ascii, the CR end of line, it does not seem to make a difference.
I've deleted the frame and have re-done it from scratch... again that did not make a difference.
Preview and generating the Merged Document works fine, EXCEPT that the optional Address2 and Country fields that should not be there when blank are always there.
When I look at the characters inside the csv file, I see consecutive commas for the empty Address2 field (that's really empty, right?).
The source document looks like this...
The preview looks just like the resulting merged document. Where the empty field is supposed to be looks like this:
Content Placement options have "remove blank lines for empty fields"... but it is not happening.
I don't really know what the two little ::'s are (they are light blue, like hidden characters).
There's a soft line break in there, on top of the '::' hidden character(s) icon. While in the Merged Document, it seems to take several left arror or right arrow clicks to get thru them, as if they are really there. But I don't know what they are or how to get rid of them (they are NOT there if Preview is turned off). Any idea what these are?
I suppose InDesign thinks the field is NOT EMPTY but as I noted, in the .csv there are two consecutive commas, there is nothing there (looking at the csv with a hex editor).
Any ideas, anything else I can look at?
Rob
my InDesign is fully licensed, CCC 'all apps' on Mac High Sierra
Copy link to clipboard
Copied
I figured it out: the tagged fields <<ContactAddress2>> need Paragraph endings (NOT Soft Line Endings).
When an optional <<ContactAddress2>> field is empty, and after it is properly removed, a Soft Line Ending (which is in fact a line feed character, 0x0A, I think is still there.
After entering Paragraph breaks at the end of each field, select all of the tags and adjust the end of paragraph spacing to zero. That makes optional tagged fields optional... and <<ContactAddress2>> collapses to nothing, as desired.
Onward!
Rob
Copy link to clipboard
Copied
Hi Rob, where did you make the changes, in the CSV file? How do you make a paragraph break?
Copy link to clipboard
Copied
Hi there,
I think I discovered that just the return key (without a shift) does it on my Mac.
By default the paragraph formatting is set with some trailing space, so when you hit return it inserts space. That’s why I initially used shift-return and got the soft return. But use the Paragraph Return and then select the tags & change the paragraph formatting for 0” of trailing space if that’s what you want.
In the Type menu near the bottom you can insert a Paragraph Return; that’s the other way to do it.
Take care,
Rob
Copy link to clipboard
Copied
Sorry, the "remove Blank Lines" does not work in Indesign 2018. It is better to use HP SmartStream Designer for VDP. It will manage crappy csv files etc.