Designing and Data Merging with multiple records in InDesign CS6 or CC
Tutorial Details
Difficulty: Advanced
Estimated Time: 35 minutes
In this tutorial we’ll show you how to data merge multiple records from a spread sheet (Numbers or Microsoft Excel) into a document with InDesign’s data merge feature. It is a complex technique that can create great – looking informational design when used correctly.
Can be used for:
- Badges
- Designed Data Lists
- Informational Graphics
- Catalogues
What you’ll need:
- Data source (.CSV file)
- InDesign document
IMPORTANT: Rules for multiple record data merge
- A multiple record data merge can only be produced from a single page InDesign document. Having two or more pages restricts data merge to single-record mode.
- Everything on the document page – even if it has no data placeholders in it – will be duplicated in the merge process. If the other objects on your page prevent more than one record from fitting (such as a big background image), data merge will behave as if it’s producing a single record layout because the document can’t accommodate more than one record per page.
So if there are page elements you want on the pages that don’t need to be part of the merge, move them to the master page.
#1 Get all the dynamic information in a CSV file
In this example I am using Microsoft Excel in Windows; however, these steps should be similar to Numbers in Mac OS.
Add any data you’ll need in the data merge onto the spread sheet.
Example:
- Project Name
- Department
For any content you do not want duplicated on the page, add it to the master page. This could be an introduction or an image etc. To data merge an image we need to place the link to the image in the CSV file and provide the heading “@img”. In Excel this should be typed as ‘@img. The ‘ provides a resolution to an Excel bug where it doesn’t recognise @img by itself.
Make sure you have your headings across the top and records underneath as shown.
Export your data to a CSV format (comma delimited file). If you have multiple sheets of data try and consolidate them to one. If not the different sheets will be separate CSV files.
#2 Open up your prepared InDesign file – this should include your designed master pages.
Set up your design in InDesign. You can use master pages for the layouts and content you don’t want duplicated on the same page. Anything that is going to be data merged needs to be on the main page otherwise it won’t work.
#3 Set up your data merge design – use paragraph and character styles to make changes later on easier.
The data merge design is something that will take tweaking to get right. At this step we just want to create the design and layout. So use text boxes, tables, image boxes, lines, colour etc.
Make sure to use paragraph styles and character styles to allow changes to be made in future updates to the document. Finally make sure to group everything so the design layout is maintained.
#4 Optional: Change any text boxes to Auto size height, width or both under text frame options.
Text Frame Options contains a few features such as Column width flexibility, balancing, Inset Spacing, Vertical Justification, Baseline options and Auto-Sizing. This is accessible from the top menu under Object – Text Frame options.
The content from the excel file that we are using has variable content length. For example Project 1 has a short project description and Project 2 has a long project description.
InDesign can adjust the size of the text box so that no text becomes overset. To do this we go to Text Frame options – Auto size and select (for the purpose of this design) Height only. We want the text to flow downwards so also select the arrow pointing downwards underneath the Auto-Sizing drop down.
#5 Select CSV file to be merged in InDesign
Along the top menu, go to Window – Utilities – Data Merge and a new panel should pop up. Click the further options button and click “Select Data Source”.
From here select the CSV file and click open. There should now be a list of data field titles.
#6 Put your data field titles in the design – make sure it’s on one page only.
Now start adding the data field titles to the design. This will insert placeholder text which will be substituted in the merged version of the file with a record.
#7 Style placeholders if necessary
As part of your design you should have styles already. If not, change the paragraph or character styling as necessary and create a new style from it by highlighting the text and clicking “Create new style”
#8 Optional: Put in an image – generic image sizing can be applied at the data merge.
We also want to add an image to our design. As part of the CSV we imported an image link. InDesign will automatically link to that image. Add the image placeholder to the frame by simply clicking the frame and then clicking the data field title.
#9 Create Merged Document – select multiple records on drop down for records per document page. Select record range if need be.
Go to the data merge panel, click the drop down and select “Create merged document”.
Under “Records per Document Page” select “Multiple Records”. If this area is greyed out then you need to delete any extra pages that you have in your document so that you are left with one page (having multiple pages in the master page layout is fine).
If you don’t want to merge the whole CSV then select the range by row.
#10 Select generate overset text and alert images missing
Make sure “Generate Overset Text Report” and “Alert When Images Are Missing” is selected.
#11 Click on multiple record layout and preview
By the preview we see everything is overlapping and needs more space in-between.
#12 Adjust columns and rows depending on your sizes, arrange by either columns or rows first.
Under the spacing section we can increase the spacing between the columns and the rows until nothing is overlapping. This is great if you have specific placement needs in your design.
#13 OPTIONAL: Under options select fitting that you want to apply to images.
Depending on the image sizes, you may decide to fit or fill frames proportionally. In this instance we want to fill frames proportionally.
#14 Click OK to merge document
This will create a new document that has the merged data in it. It will create as many pages as it needs to merge all the data you selected. We can delete or add pages as necessary.
#15 Apply Master Pages
Now apply the master pages as needed by dragging and dropping the master page onto the page you want to apply it to. Now just organise the data in their correct places.
#16 Apply Master Pages
Now apply the master pages as needed by dragging and dropping the master page onto the page you want to apply it to. Just organise the data in their correct places.
Conclusion
In this tutorial we’ve learned:
- How to use Data Merge in InDesign
- How to merge multiple records per a page
- How to format an InDesign document for multiple records
I hope you have found the tutorial helpful. Feel free to comment below.
Thank you for a great tut. I followed it closely, but when I merge, I get one page per post whereas I want 8 post per page. What to do?
Thanks,
Yth
I am setting up address labels. They only want the label to always be three lines. Is there a way to apply a setting to each line of text to reduce font size for longer lines to fit the width of the text box. If I check no line breaks and set auto width, it still makes the text box bigger and puts the name all onto one line but it is not fitting on the label anymore?
It doesn’t allow me to create a document with facing pages/spreads – it only merges data onto single pages. Is there a certain option to allow the document to merge data onto facing page spreads like in your example pictures?
In the document setup of the merged file you can change it to facing pages. This setting can be found under file/document setup and just select the check box for Facing Pages.
Is there a way to generate charts in indesign using data merge?
There are a couple of ways, but all of them require more than just InDesign, using either InDesign Server or a more simpler solution like Chartwell font which you can read about here: https://indesignsecrets.com/creating-charts-graphs-automagically-data-merge-chartwell.php
I have a spreadsheet with 300 records and i never need to a merge of all
the rows at once. Its usuallly about 50-100 rows. Is there a better
way to select which rows i want merging other than the range box? For
example the way that publisher does it. Because adding a range in means i
have to remember which row number the data is on.
I have a box that needs to change color based on a hex value in a CSV file. I did not see that covered in the tutorial. Ideas?
Hi there, can anyone help me? I am trying to create place cards in alternate colours using data merge from a .csv spreadsheet.
I have made a pink version and a teal version of the cards and just want it to alternate between them as it inputs records. How do i set the document up to do this? I guess it is something to do with how the master pages etc are set up but i dont understand it well enough to fix.
I have managed to get it to do more than one record per page but it is doing a pink and teal one for each person and I cant fathom how to sort it. Also, it is only printing 4 on each page even though there is room for 6.
You can see the document here:
https://drive.google.com/file/d/0BwEonpsdrHioYl9IMC1kd1dTaXc/view?usp=sharing
https://drive.google.com/file/d/0BwEonpsdrHioY0stQlRZekhkeVk/view?usp=sharing
Can you help?
Reply
I would create the pink one first but have two separate csv files. One CSV file would have the names that would be in pink and the CSV file would have the names that would be in teal. I would the make a copy of the data merge file, change the colour to teal and apply the CSV with the names that belong on the teal place cards.
It’s the easiest solution.
Hi there, the option to switch from Single Record to Multiple Record is grayed out. Is there something that I need to do in order for this option to become available again? Thank you.
The only think I can think of is to remove any extra pages?
Hi Linaka, Thanks for the tutorial. I’m doing a catalogue with information updating frequently but Im missing the part on how to continually update this information once the document is merged, is this possible? or do I need to run the data merge all over again? So how to you update the information once you run the data merge? Thank you for your help!
Hi Regina,
To continually update the information, you would need to run the data merge again. Alternatively, do a find a replace if it’s only a small piece that you need to change. InDesign Server has more powerful tools that could help in that regard but the cost is also a lot higher.
Hope that helps.
Linaka x
Thank you, this is exactly what I needed to layout some Avery name badges.
Glad you found the post useful and thanks for reading.
Good day, I came across your tutorial a while back, and it surely helped a lot, Now I stumbled onto something else I have no Idea how to solve. Let me explain the situation..
The layout is for digital publishing, which means that alternative layouts are being used. Now in the past it was very easy just to update the content using the data merge panel, but now when I do that, having an alternative layout with the same content, In design crashes. So I am assuming I’m just not doing it right, or it is just not possible to update the alternative layout? Do you think there is another way I can do this? The data on the digital layout should be updated once a week, so there is just no way of doing the layout over every time for portrait and landscape(e-book).
Brilliant tutorial. Thanks!
Hi, Linaka
Thanks for the tuto. Very well explained and right to the point 🙂
Hi
I am also facing problem to create multiple records in a page.
Same name is repeating in one page.
Please solve my problem.
thanks
I’m sorry Linaka, but this does not work for me and I have followed the tutorial step by step. My csv file is similar to yours. In fact, my project is very similar to yours. Where I am hung up is at multiple records. Like Jay, I can’t seem to generate a page of merged data that consists of unique records.
InDesign is refusing to open my CSV file. Any ideas?
If the CSV is open in Excel then Indesign will not work with it. Annoying but that’s been the case with when I’ve experienced this issue.
This tutorial is a huge help, thank you. I could do with a little extra assistance as step 16 has confused me.
I am designing a brochure with standard product module pages (easy merge) interspersed with introduction text/chapter pages. All this is preceded by About us and other such corporate pages, and the final few pages are a glossary of terms.
How the heck can I pull all the information in from a single CSV file whilst preserving the layout?
The end product will be in English, but I will also want to publish in up to 31 languages using identical (but translated) CSV files.
Many thanks in advance.
Hi Kieran,
I just sent you an email with a sample file. One thing worth remembering is that it can get very complicated, very quickly so it’s worth simplifying the process as much as possible. You can either have the final data merged indesign file created and just the move those pages into your fixed layout document or you can have the fixed layouts set on master pages within the file to be merged and apply the data merge that way. Does that make sense?
What a godsend of a page! Thank you very much.
Hi Linaka,
Very, very nice tutorial – thanks!!
I do have one question:
I’m trying to make at product catalouge, including image, description, price and item number.Is there a way to force a new/next page every time the item number changes its first digit?
My design is giving me 7 items on each page, but I’d like that every time the first digit is changing (9 times, obviusly 😉 ), this “next group” should start on a new/fresh page.
I hope you can see where I’m going at…
Regards
Jean Jensen
Hi Jean,
Glad you like the tutorial. From what you’ve described, I’d guess that you’ll need to create a single record per a page and have the individual items as part of that single record. I’ve never tried to do this before but I’d assume as part of the single record on the CSV you’ll have name tags like “item 1”, “item 1 name”, “item 1 description”, “item 2 name” etc.
This way you’d probably be able to have more control on what is on each page.
Hopes that helps,
Linaka
Thanks Lineka – I’ll give it a try 😉
Hi and thanks for the tutorial. Sadly, I have a weird problem I can’t solve. I followed all of your steps and those in the official video tutorial on adobe site several times, but the problem is I view all working correctly in the preview of the data merge, but when I create the merged document I get all duplicates of only one record. My csv seems fine.
Hi kopeboy. Did you ever find an answer to your data merge question? I’ve just started creating nametags, and I’m getting the same record repeated over and over. I’ve followed the steps, so I’m not sure what I’m doing wrong.
Hi Kcollar,
The only way to really help on this is to see a step by step of what you’re doing. I’ll email you.
– Linaka
If you find the error and a solution would you please email that to me too? I haven’t found a solution yet and I ended up pasting all info manually 🙁
Yes, I figured out how to have different names appearing for each name tag.
– I set up one name tag with appropriate data fields in the upper left corner of the page, after looking at the name tag sheet and figuring out exactly where it would go.
– In the Data Merge menu, go under “Create merged document”
– Under the Records tab, select “Multiple records per document page”
– On the same screen, choose “Multiple record layout” and set it up so that the name tags appear the way they should when printed out (select “preview multiple record layout” to see how it looks).
– Then merge the data, and the separate names should appear in each name tag.
Hope it works for you!
Hello. I’m having the same issue setting up name badges. I followed kcollar’s advice on September 25, but I am getting a different record… each on a separate page. Does anyone know how I can fix this?
This is the exact problem I’ve been having — it’s maddening. Everything looks good when I preview too.
Hi Linaka,
Thanks for your great tutorial. Is it possible to update the data in the linked CSV file and then instruct the InDesign file to update the data?
Yes it is, but only before the document is merged. On #9 you can see under create merged document an option to update the data fields. It’s currently greyed out because InDesign recognises the file path as the latest version, similar to it’s update Links technology i’d think.
Hi Linaka,
It’s me again. When you preview for multiple record you get 9 in one page. How do you get this? I’m looking to add 6 on a page. Is there an option or do you have to insert something for it to read that i need 6 on a page? Please advise.
Thank you for your help.
Jeff
Hi Linaka,
Great tutorial. I’m trying to do multiple record data merge in one page, “6 up” specifically. For some reason when I hit the preview button it doesn’t show the other 5 labels. How does it know how many I want per page? Is there a reason why this is happening?
I have a file very similar to the one you show in your tutorial. I am attempting to make auction bid cards. I have two per page and the data I am trying to merge is the item name and the item number. I can’t seem to figure out how to get the send record to merge to the right side of the page (the second bid card on the same page). It just goes to the next page. In Word, you would insert a “next record”, in InDesign, I have no idea. Solving this would save me a huge amount of time as we have over 200 auction items. Any help is greatly appreciated!
Has anyone given you a response to this?
You would modify the spacing between columns and rows to just allow two per a page as shown in #12. You may need to adjust the object size to allow for that. i.e create a grouped empty box with a text box inside to force the others off of the page.
Is it possible to change layers based on a field in the data?
i wanna ask you a question. How to change font (or color) if I have applied all pages?
p/s: sorry for my bad english 🙁 If you understand what I mean, pls reply me as soon as possible
so handy!!!!!!!!!!!!
I almost never drop remarks, but after looking at some of the comments on Designing and
Data Merging with multiple records in InDesign CS6. I actually do have a couple of questions for you if it’s allright. Could it be only me or do a few of these responses come across like they are coming from brain dead individuals? 😛 And, if you are posting at other sites, I’d like to follow everything new you have
to post. Could you post a list of the complete urls of all your social
community pages like your twitter feed, Facebook page or
linkedin profile?
Please disregard the first comment.
This is my problem:
I have one page in the InDesign file and all the graphic elements on the Master pages. But when I go to create multiple records all I get is just one entry per page? How do I fix this? Is it the InDesign file or the Excel file?
Thanks,
Have you tried locking the placeholder frame and then adjusting it from there?
Linaka,
Great tutorial!
However, I am trying to apply my master page into the pages that i merged. But it is not showing.
The only thing I currently have on my master page is a logo, that i want repeated at the top of every page that indesign creates when merging.
I’m not sure if I am doing something wrong…..
Thank You,
Yaritza
Hi Yaritza,
When you look at the merged pages in the pages panel do you see the master page letter associated to that page? Also have you checked that any frames covering that space doesn’t have a fill?
Hello Linaka,
I do see the master page letter associated to the pages. However, I am not sure i understand where to look to see if there is a fill covering that space or not…
The fill is located under swatches. When you click on a frame covering a space the swatches will show if there is a colour in the frame or not. I would suggest to look at a tutorial regarding swatches and fills.
Linaka,
Your tutorial is great and helped me get through some road blocks I was hitting; however, every time I run the data merge, I am getting multiple copies of the last record in the CSV file. I can’t seem to generate page of merged data that consists of unique records.
Any ideas?
Thanks in advance.
Regards,
Jay
Hi Jay,
Glad that the tutorial helped you through some of the roadblocks.
Regarding the last record being multiplied – I’d say that there are two possibilities
1) The CSV file has an error
2) The Data merge options you have set in your document need tweaking.
It’s hard to understand the cause of it without seeing the context. If you like I can go through it with you and try and figure out where the problem lays?
Linaka,
Thanks for your reply. After I sent you the email, I continued to work on the data merge and finally figured out what I was doing wrong. It was relatively simple but at the time I was working on the premise that it could work.
I’m doing a catalog project that is relatively large and I initially thought that I could data merge my .csv file into a table used as my template. It dawned on me that the table was probably the problem and after I recreated the template without the table but using tabs, it worked perfectly.
Thanks again for your response.
Regards,
Jay
Jay,
Glad you found a workable solution. It is possible to data merge into a table (I used a table in the tutorial). Still, at least you managed to merge the data even with a work around 🙂
Take care,
Linaka
If you’re having issues with the records at the end, try coping the cells you want to DM into a new document and continue from there. I’m betting you’ve got some extra records somewhere in the .csv that aren’t where they should be.
Also, make sure you close out of the .csv before you datamerge it! ID doesn’t like open files when using them to DM.