We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
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?
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)
2016, Indesign does not seem to support this yet, still sad.
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."
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:
Of course it’s got some limitations, but you don’t have to run a find / replace or break the link to the source.