Episode 43: Data Merge (VIDEO)
Who says data and design are mutually exclusive? Not InDesign, that’s for sure. Under the right circumstances, data-driven layout is the way to go. Unlike XML, which makes designers run from their computers, the Data Merge feature in InDesign is an easy way to accomplish fast, flexible data-driven layout creation and updates. Using a subscriber’s files as an example, this episode takes a video look a topic that was tackled way back in the audio-only days of Episode #7.
Watch the episode here (15:00 | 28.6MB), or you can subscribe via iTunes.
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

March 1st, 2008 at 11:01 am
Since watching this tutorial, I now use this method to create my clients monthly product offer sheets. They simply email me an excel spreadsheet with Product code/description/link to the relevant images/price/new price/sizes in stock/any other info needed… which is all exported direct from their SAGE accounting system in one easy report. The relevant images (i have stored locally in one folder as part numbers, which match the image links from the clients sage package).
Then i use the same process on the final flyer to add the recipients addresses, again exported into excel/csv from SAGE by the client.
A basic 100 product A3ds flyer can be produced ‘in minutes’ giving me more time to be creative and punchy with the overall layout. Plus, Any last minute price changes are no longer an issue!
THANK YOU!
March 1st, 2008 at 3:15 pm
Thanks for sharing this great information, it really helps a lot. Need your help, I am creating a catalog. I got 300 items to put in with a corresponding page. Using Excel, I have the list of items and a column for page_number to indicate where the item should be placed. I was wondering how can I make inDesign automate to create a text label for the item specific only for a page. I hope you can help me. Thanks very much.
data example:
Page Item# Price
2 10001 $20.99
2 10007 $10.99
2 10006 $32.99
2 10004 $14.99
2 10046 $32.99
3 10024 $14.99
3 10016 $32.99
3 10036 $14.99
4 10306 $32.99
4 10403 $32.99
4 10502 $14.99
4 10708 $14.99
March 1st, 2008 at 4:36 pm
Dan — Thanks for sharing your experience. The whole point of the podcast is to reveal those features that make the work itself easier so that we can all spend time making it better. It’s always great to hear these “case histories” from the audience, and very rewarding for me to know that the ideas are being incorporated into people’s everyday projects.
March 1st, 2008 at 4:53 pm
Minji — You can’t designate on what page an item will be placed via Data Merge (or even with XML, to my knowledge). The records will flow into the layout in the order in which they’re entered in the data source. These features rely on consistency.
If you had the exact same number of items that had to go on each page, Data Merge might get you there. You’d just set up your template to fit, say, 6 items per page. From what you show above, there are 5 items destined for page 2, 3 for page 3, and 4 for page 4.
The only way data merge could be used for this would be to create dummy records in the Excel file, then delete those imported records in the merged InDesign document. Unfortunately, that’ll leave you with empty spots in the layout.
It’s also difficult for me to determine what, exactly, these “items” are made up of based on what you’ve described above, so a suggestion for solving your particular problem isn’t easy.
March 6th, 2008 at 12:29 am
Hi Michael, thanks for your message. Yes the count of items are not the same on every page, a page might have only 12 items but on the next will have 20. The catalog is sorted by brand name so it depends how many products can fit on a page. We have like shirts, jackets, caps, shoes, accessories, etc. I think I have to do it manually since the number of items on a page is not the same always. Sorry for me
If you have other solution just let us know. Thanks very much!
March 20th, 2008 at 10:38 am
hi michael, i am trying to save my file as a tab delimited but i do not get that option by save as. i am using excel 2007 (pc)
please help although it is not a design concern (basically we become some sort of programmers in indesign…)
thanks very much fro the podcasts
March 20th, 2008 at 10:56 am
Amaltra — As a die-hard Mac guy (and one who is still using Office 2004), I can’t exactly pinpoint why you’re not seeing this option, but when I do a “Save As…” the pull-down menu I see looks like this:
If you have no luck finding it that way, keep this in mind: when you copy and paste from Excel into a text file, you’ve automatically converted it to tab-delimited text. The columns are swapped out for tabs that way. So if you run out of other options, cut and paste what’s in your excel file into a plain text file, then save it as a text file. There’s really nothing special about the “tab-delimited” format itself. It’s just a plain text file.
March 24th, 2008 at 10:42 am
Michael,
I found your tutorial very helpful. I have been working learning the data merge in CS3 and I am having a problem with the photos linking. I have followed your tutorial but everytime I click on the preview button I get a message that says “the data source references one or more missing images. The missing images cannot be previewed or merged…” I have set up my data source file as you showed in your tutorial. I have the files named all the same, including checking the upper and lower cases of letters. I must tell you I am setting up my spread sheet on a PC, then saving it as a tab delimited file, then I work with Indesign on a Mac. Could this be the issue? This is how I have listed the info for pictures in the spreadsheet.
Desktop:YTD testing:postcard mailer:graphics:white water rafting male.jpg
Do you have any suggestions as what the problem might be?
March 24th, 2008 at 12:45 pm
Linda –
I don’t think that starting your spreadsheet off on the PC is the culprit here, but if the images you’re referencing are on that PC, you’re going to have an issue with the file paths, because PCs require backslashes between directory levels, not colons. But if these images are all on your Mac, and you definitely have the “at” symbol as the first character in the header for the column that lists your images, I suggest trying to do a truly “absolute” path for the files, rather than just starting at “Desktop.” Since each user has his or her own “Desktop” folder, I find it’s safer to make my file paths bullet-proof, as follows:
Macintosh HD:Users:myusername:Desktop: and so on…
Give that a shot and let me know if it works.
March 24th, 2008 at 2:05 pm
Michael,
That was it. Once I changed to the “absolute” path the pictures came in fine. You have been a great help. Thank you so much.
April 30th, 2008 at 10:00 pm
Hi Michael
we have been trying to produce name cards for a customer event. Have followed all the steps in your Data Merge video, which was fantastic. BUT, while we can preview the 3 pages with names in correct order etc, so preview is perfect; when InDesign actually creates the document it only has one name repeated on everycard.
Please help!!! We can not figure out why this happens.
Thanks
Nora
May 1st, 2008 at 9:20 pm
A whole day of frustration!!! The Answer was Do NOT use an Avery InDesign Template!
May 2nd, 2008 at 8:33 pm
Nora –
Sorry for the delay. I’ve been traveling.
Just out of curiosity, do those templates include other elements on the page?
I’ve had experiences with Data Merge where the preview looks great but another object on the page causes the merged file to appear entirely differently. You may still be able to use that template, but with some modifications.
May 22nd, 2008 at 2:50 pm
hi
data merge is very great tutorials….same time i need one more thing… as per your tutorial it will come single text frame..in every data.
example:
COMPANY NAME:
PO BOX, CITY, TEL, FAX
EMAIL
WEBSITE
WE HAVE 500 CLIENTS… SO GIVE ME EASY WAY FOR all data contain one text frame.
lot of thanks..
-ahamed
May 22nd, 2008 at 2:56 pm
Ahamed –
The solution for what you need is not Data Merge, unfortunately. To get repetitive data to flow continuously through one frame (or a series of threaded frames), you’ll want to work with XML instead. Using tagged XML data, and by putting formatted placeholder tags in an InDesign file, you can flow those 500 listings one after another, as well as keep them linked to the source data file.
Michael
June 4th, 2008 at 6:18 am
Hi!
I was making some contact-sheets. And I was playing around with the @foto path. I discoverd that if you place your .txt or .csv file in a project folder and then create an image folder inside the project folder - Then you don’t have to type the long path for your image files.
Just type /photos/yourphoto.jpg (I hope this makes sence?)
I have made a screenshot of the project folder and the notepad - http://www.madsbo.dk/sider/datamerge.html - perhaps this is easier to understand?
I found that it is much easier to type in the images path, and if my project folder is moved to another computer, the path to my images won’t get “broken”
I guess the slash / would be replaced with a colon : on a Mac?
- Mads
June 17th, 2008 at 12:22 pm
Excellent tutorial!
What I’m trying to do is Group the output. For example, like a Company Telephone Directory where people are listed by Department.
Department Name
Name1 - Email
Name2 - Email
etc
Next Department Name
Name1 - Email
Name2 - Email
etc
Can this be done with ID? thanks
zu
June 17th, 2008 at 12:54 pm
The thing to remember with Data Merge is that new objects (text frames, tables, image frames, etc.) are created for each “record” in your data source. So, if you want to fill a page with text like you show above, you certainly can, but that text will exist in individual text frames for each item. You might want them to run continuously in a single frame, of flow through multiple frames in a threaded story. To accomplish that, you’ll need to use an XML approach, rather than a Data Merge approach.
July 16th, 2008 at 12:47 pm
I know it’s kinda late to respond to this thread but I’m curious to know if it’s possible to create a template that is different on each side of a spread (eg images away from spine and text towards spine)
I know it’s been said before but your tutorials are absolutely amazing. I love the in-depth knowledge. Keep up the good work.
September 12th, 2008 at 8:54 pm
If you have the educational version of inDesign you can not have multiple records per page. That function is greyed out.
September 12th, 2008 at 9:38 pm
I doubt that this is the case, Karen. More often than not, the graying out of the Multiple Records option is due to some error in the setup of the file that acts as the merge source. If you troubleshoot your layout for potential errors and eliminate them, I think you’ll find the Multiple Records option will be available to you. There’d be very little use to Data Merge without that feature.
October 7th, 2008 at 10:30 am
Hi Michael!
Thank you for a great tutorial.
I have the same question as Rheal Poirier, is it possible to make Idesign render the pages as spreads? I only get single pages?
Thank you!
Charli
October 31st, 2008 at 2:31 pm
Michael,
I have a question that you may have already answered so I apolgize if this is repeat info. I am using data merge with a .csv file and I have the follwing layout
Name
Address 1
Address 2
city, state zip
In some cases I do not have a Address 2. Is there a way to automatically move up the city, state zip line if there is not address 2, rather than having a blank space in the address field?
Thank you for your help.
Linda
October 31st, 2008 at 7:31 pm
Michael,
This tutorial was fantastic! Thank you.
I’ve designed a 20 page booklet in ID to be mailed to 1,000 addresses. I’d like to merge address information, but in using the tips in your tutorial, a massive document is created. On top of that issue, I’d like to use the “Print Booklet” function . . . do you have any advice? I’ve used Print Shop Mail in the past, but I’d like to migrate towards printing within InDesign.
Happy Halloween and congrats on the newborn!
Best,
Christian
P.S. If you reply in this forum, can you forward a copy to my e-mail? I’ll check back here as often as possible.
November 4th, 2008 at 9:58 am
Christian –
In all honesty, my best recommendation to you is to find a variable-data printing service that can handle this job for you. It would probably cost you a little bit of money, but it would save you a ton of time and eliminate the need to produce a 20,000 page document. That, in my opinion, is too large for Data Merge’s intended use.