Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


How to keep line breaks in CSV, TXT docs during Data Merge?

New Here ,
Apr 07, 2009 Apr 07, 2009

Copy link to clipboard

Copied

I have tried \r\n and <br> in a .csv and .txt file data merge. Is there an escape character that allows InDesign to read the formatting from the source doc? My source doc has hundreds of records each containing 7 fields, one of which is a list of procedures. These vary from 2 to 8 procedures. Is there an easy way to merge this data into ONE text field on my target doc so that Data Merge preserves the line breaks and my Paragraph Style formats the text in an appropriately numbered list?

TOPICS
How to

Views

56.4K

Likes

Translate

Translate

Report

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
Contributor ,
Jul 29, 2013 Jul 29, 2013

Copy link to clipboard

Copied

If you need line breaks in order to avoid empty lines taking up space - for example, if entries take up a line each and are sometimes blank, and these lines shouldn't show, one simpler workaround is to have the paragraph style set to have leading of 0, then add a GREP style matching \w that adds a character style that has leading.

This means that entries with no letters or numbers in them take up no space in your layout - useful for vertically aligned or auto sized text boxes.

This is no help for numbered paragraphs, unfortunately, but it's easier than find-change hackery for other uses.

-----------

(off-topic: it's not just Kopy-Rite who is unhappy that much-discussed limitations like this exist for years and years and years without any attempt to improve or fix them. On other threads on this topic, you'll find many suggestions of other data merge tools that support line breaks and are genuinely professional quality, not just priced as if they were. Also, having regulars flame any criticism of Adobe just looks ugly, undignified and defensive: especially when they seem to deliberately miss the point ("don’t ask me to be happy to pay $600 for a file conversion utility"). The dismissive put-down about "nonsense about Adobe having some major conspiracy to extort money from users through forced upgrades. You upgrade because you either need to or find value in doing so, neither of which is under Adobe's control" looks pale and naive now that Adobe's entire business model for CS/CC applications has switched to rolling forced paid upgrades with monthly billing that is compulsory regardless of whether there are any new few features with need or value. Turns out it wasn't such an unreasonable concern after all)

Likes

Translate

Translate

Report

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
New Here ,
Mar 01, 2016 Mar 01, 2016

Copy link to clipboard

Copied

2016, Indesign does not seem to support this yet, still sad.

Likes

Translate

Translate

Report

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
New Here ,
Mar 21, 2016 Mar 21, 2016

Copy link to clipboard

Copied

Actually there is solution for this:

"...select Content Placement Options from the Data Merge panel menu and turn on the Remove Blank Lines for Empty Fields checkbox."

http://indesignsecrets.com/rid-empty-lines-data-merge.php

Likes

Translate

Translate

Report

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
New Here ,
Jun 01, 2017 Jun 01, 2017

Copy link to clipboard

Copied

In case it ends up helping anyone– I recently discovered a workaround allowing you to break lines directly from the csv with a little tweaking:

https://indesignsecrets.com/controlling-line-breaks-with-data-merge.php

Of course it’s got some limitations, but you don’t have to run a find / replace or break the link to the source.

Likes

Translate

Translate

Report

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
    • 1
    • 2