Skip to main content
Participant
August 4, 2022
Answered

Data Merge. Need to embed a carriage return placeholder in CSV to make hard breaks in paragraph

  • August 4, 2022
  • 1 reply
  • 1444 views

I've seen this question asked many ways... but I don't think the GREP discussions were about data merge files.  

And I've seen it here about XML data, but this method doesn't work either (https://community.adobe.com/t5/indesign-discussions/including-carriage-return-with-xml-table-data/m-p/7759546)

 

I have a text file for data merge.

I can make it csv or tab delimited or whatever else you tell me.

One of the fields is a formatted paragraph with CRs. So it forces a hard break in the txt file.  DataMerge stops reading that record at that CR.  So I can string it all into one line without any issue.  On my end, I can replace the CR with a token.

 

I've tried <br/>, and &#13; and &x0d; and all those just appear as literals in my merged data.

I've watched the "Solis" video (both).

Someone please tell me what I need to do - PLEASE!

Thanks in advance!

This topic has been closed for replies.
Correct answer Joel Cherney

Well, what I always do when I'm in your shoes is:

1) In my text editor, I replace all my hard breaks with something weird that doesn't appear in the document (Thai currency symbol, Linear B, something that would never appear in the document I'm working on) and save

2) Merge the document in ID

3) Replace the "something weird" with a hard return using Find/Change (or a soft return, if that's more appropriate to the circumstance)

 

 

1 reply

Joel Cherney
Community Expert
Joel CherneyCommunity ExpertCorrect answer
Community Expert
August 5, 2022

Well, what I always do when I'm in your shoes is:

1) In my text editor, I replace all my hard breaks with something weird that doesn't appear in the document (Thai currency symbol, Linear B, something that would never appear in the document I'm working on) and save

2) Merge the document in ID

3) Replace the "something weird" with a hard return using Find/Change (or a soft return, if that's more appropriate to the circumstance)

 

 

Participant
August 6, 2022

thx, but this doesn't really help me. 

Hope someone else has something better.

I already said I can replace the CR (carriage return) with something else, so no need for step #1.

This is something that needs to be done "automatically" with some sort of macro/script/JS/GREP style/etc.

 

Participant
August 7, 2022

That's such a simple find/change operation that it hardly merits the creation of a script. Write the query once, save it and recall it as necessary. Might take ten seconds longer to open the dialog and load the query than it would to run a script with a keyboard shortcut.


ok guys, thx