Need InDesign data merge help
November 2, 2011 7:21 PM   Subscribe

I am doing a Data Merge and I need to drop out blank lines. I want to split some of the lines to the right and left, but how can I do this without embedding some whitespace?

I am using Data Merge in InDesign 5.5 to build a school phone directory. I have to match last year's version, which was done in Access(?!) by someone who can't answer any questions.

In the section where students, their teacher, and their grade are listed, I want to drop out blank lines for families with fewer kids. Those fields are on lines with two fields, one left-aligned and one right-aligned. The problem is that there could be from one to four of these lines, and I want to drop out the blank ones.

If I leave *any* space between them then the line is never "blank" and can't be left out, but I can't send them to the left and right without some whitespace in between them. Oh, and the right-aligned field has an embedded space so I can't just Justify it.

Can anyone suggest how to do this? I thought of a table, but the empty rows would still appear, right? My prepress days are some years behind me, but I am an IT guy and willing to try just about anything to get this done.
posted by wenestvedt to Computers & Internet (8 answers total) 1 user marked this as a favorite
 
Response by poster: Adobe's official docs says, "If you want the left side of a line of text to be left-aligned and the right side to be right-aligned, position the insertion point where you want to right-align the text, press Tab, and then right-align the rest of the line."

But if I do that, then blank fields leave the line with a naked tab, and it's no longer "empty."
posted by wenestvedt at 7:32 PM on November 2, 2011


Best answer: Couldn't you do the data-cleaning part (drop blank lines) in some simpler application, Excel or whatever, and then use InDesign at the last moment you can afford to merge the data?
posted by LogicalDash at 7:58 PM on November 2, 2011


Response by poster: Yeah, I cleaned out as much as I could. It's the part about needing a tab mid-line for justification that's killing me. In Excel I figured out how to concatenate a couple of cells with a space in the middle (=A1&" "&B1), but that still leaves a space in those cells. Maybe more Excel work (OK, BBEdit and grep) will help tomorrow, deleting empty concatenated cells.
posted by wenestvedt at 8:16 PM on November 2, 2011


Best answer: I'm not sure I get the question, really, but if you want a tab between terms in Excel you can do:

=A1&CHAR(9)&B1

...or similar.
posted by pompomtom at 8:37 PM on November 2, 2011


This sounds like a job for awk, sed, or python. I also think we'd need to see example text (original, desired) in order to give useful help.
posted by beerbajay at 4:24 AM on November 3, 2011


have you tired something like datawrangler? I haven't tried it, but it looks really cool.
posted by rockindata at 4:54 AM on November 3, 2011


Best answer: At this point, I have come to peace with this job's weird requirements, and resigned myself to some manual work. :7)

I will create a concatenated field in Excel -- using the "(=A1&" "&B1)" formula -- and clean up empty fields in BBEdit. That way InDesign can build properly-sized text boxes, leaving me to insert a tab in each student's entry. (It's only like 700 kids, and I will listen to a movie or something while I work. :7) At this point the restriction of the requirements doesn't suggest another solution.

Thanks for your thoughts, everyone, and I will check in on this for a few more days until the deadline finall!y arrives!
posted by wenestvedt at 9:11 AM on November 3, 2011


Response by poster: For the record: doing the layout this way resulted in the creation of several text boxes per entry (so they all have the same spacing). But since they also have different numbers of children, there is inconsistent white space and it looks kind of lousy. Next time, I will try to use tagged data (for the styles) and flow it into one crazy-long chain of textboxes.

Thanks again, everyone!
posted by wenestvedt at 7:50 PM on December 6, 2011


« Older Bioinformatics Down Under   |   Can I donate sperm to my former girlfriend? Newer »
This thread is closed to new comments.