Table of Contents
- Data Merge or Mail Merge?
- What is Data Merge InDesign and what is it for?
- What do I need to use Data Merge InDesign?
- Advanced Data Merge InDesign Tutorial
- Limitations of Data Merge InDesign
- InDesign or InDesign Server?
Have you ever had a series of information and/or data you needed to insert or transform into a document with a precise layout?
Normally, this process requires the user to copy and paste from the data source to the chosen software to create the document.
Adobe InDesign and InDesign Server are the ultimate graphics program for creative editorial projects. They allow you to make this task quicker with its Data Merge InDesign feature. You can learn InDesign basics here. Check out also our InDesign Data Merge API.
In this page we’ll cover every aspect of Data Merge for InDesign starting from:
- a section with interesting notions and tips;
- our Data Merge InDesign Tutorial;
- a final paragraph about the limitations of Data Merge.
Data Merge or Mail Merge?
Let’s start clarifying the term Data Merge. Data merge is also known as Mail Merge, even if it’s more accurate to refer to the term “Mail Merge” as a specific Microsoft Word feature to create personalized emails, letters, envelopes, and label with the recipient’s information. Data Merge is generally referred to as a specific InDesign feature to merge a data source with an InDesign document.
What is Data Merge InDesign and what is it for?
Data Merge is a specific InDesign feature that allows you to transfer determinate information from your file data into an InDesign document and to create multiple variations of this document.
You choose the desired fields of the InDesign document, and they will be populated with the corresponding information from your data source. This process is automatic. In fact, you won’t need to copy the data from the source to the new document by hand.
Data Merge InDesign is generally used to create documents composed of many pages in which data are repeated and structured in a similar way across the whole document (If you want to use multiple product templates, read this).
Data Merge is frequently used to create documents with a simple and repetitive layout, like business cards, simple brochures, badges, and so on.
If you want to create more complex documents such as catalogs, price lists, weekly ads, and more, it’s possible to run into some limitations during the project creation process.
What do I need to use Data Merge?
If you want to use Data Merge for Adobe InDesign, you need:
- Data Source
By “data source,” we mean a spreadsheet that includes textual and non-textual information, such as product descriptions, images, names, and prices. To import a data source to InDesign, you must follow the software’s exact import specifications. The required import formats are .csv or .txt, and you must be sure to define all fields correctly. If you want to use your data source file such as a simple Excel that you are already handling or a file exported from a business application, read this.
- InDesign layout
This is the layout into which your information will be inserted. You can create it from scratch or can use one of our free-to-download templates.
Data Merge InDesign Tutorial
(Updated: April 19, 2019 with InDesign CC 2019)
This tutorial will show you how to create a catalog using Data Merge InDesign.
Download the free project template:
To help you to learn and practice Data Merge, we provide a free working template. Download it from the button above. In your downloaded zip file, you will find the InDesign template and the data source in .xlsx, .csv, and .txt format.
Preparing the data source
Let’s start by preparing the data source. You need to prepare a spreadsheet (CSV or TXT) following the exact specifications of Data Merge for InDesign. Click here if you want to use a simple spreadsheet (Excel, CSV, XML or export from your business application).
Open a blank spreadsheet and use the first row to define your fields. Be sure to write the field names correctly. Add a field for every column and never duplicate a field name.
Image fields should be defined with the @ symbol prefix (e.g. @Image). The @ symbol is a special character in Excel, so add an apostrophe before it if you’re presented with an error (e.g. ‘@Image). The apostrophe will force the cell’s entire content to be considered as text.
When all of the fields have been defined, the next step is to populate the table with your records. Take care to make all image paths match your file system, for example.
On a Windows system – C:\Users\UserName\My Documents\Image.psd
On a Mac system – Macintosh HD:Users:UserName:MyDocuments:Image.psd
The populated table should next be exported as either a comma-delimited file (.csv) or a tab-delimited file (.txt). The Data Merge function won’t work with .xls/.xlsx or alternatives! Perform the export in Excel by using File > Save As.
By exporting the data source as a .csv file, you’ll have to choose the encoding. If you’re using Libre Office, we suggest choosing Unicode UTF-16 encoding to display special characters correctly.
Now close your spreadsheet and open InDesign.
1.1 Converting .xls into .csv/.txt
Conversion of .xls/.csv or .txt files can be quite complex. An Excel add-in can help you in this task.
Setting up the Data Merge panel
Now it’s time to set up the Data Merge InDesign panel. Open your InDesign document and the Data Merge panel via Window > Utilities > Data Merge > Select Data Source. In the new window, choose your .csv or .txt file and click Open.
Optional: You can change the data source import options. To do this, check the “Show Import Options” box (shown below).
Now, click “OK” and take a look at the new dialog box that appears:
The window already shows the right settings based on your data source properties. Remember, you can change these options in this box to match your situation:
- Delimiter – Choose “Comma” if you saved your data source as a .csv file. Choose “Tab” if you saved your data source as a .txt file.
- Encoding – Choose whether the file uses “ASCII” or “Unicode” encoding. Pay attention to the choice of the encoding. If you open a file that uses ASCII encoding with Unicode, the Data Merge panel won’t be populated with any fields. If you open a file that uses Unicode encoding with ASCII, the file will be imported, but some of its characters may not appear correctly.
- Platform – Choose “PC” if you’re working on a PC. Choose “Mac” if you’re working on a Mac.
- Preserve Spaces in Data Source – Check this box if you want to keep all extra spaces within your fields.
Click on “OK” once you’re finished. The Data Merge panel will now fill with all of the fields from your source file:
InDesign has identified two field types in our catalog example: text () and image ().
Mapping the fields
Now it’s time to map each field within your desired layout. Each of your data source records will follow this mapping during the subsequent automatic pagination process.
Text fields are inserted by creating a Text Frame, selecting that frame and then clicking on the selected text field in the Data Merge panel.
Image fields are inserted by creating a box with the Rectangle Frame tool (R), selecting that box and then clicking on the selected image field in the Data Merge panel.
You can also insert the fields in the layout by choosing the field in the Data Merge Panel and dragging it into the chosen frame.
Fields that are successfully mapped will appear surrounded by << and >> symbols. Numbers will also appear next to each field in the Data Merge panel. These numbers reference the page number on which each field is mapped.
If you want to insert a field in a text of your layout, you just have to place the cursor inside the text in the desired position and insert the field using one of the above methods. The field will be inserted where the cursor is positioned.
If you don’t place the cursor, the field will be queued with the rest of the contents of the box.
Continue to add all of your fields and customize the layout to meet your needs. Our example catalog uses a simple style: a large image at the top, a text frame with the price, and then a list of all of the other fields.
> We used only one product template because with Data Merge InDesign is possible to automate only one product layout. If you want instead to use multiple product templates, discover how to do it using Pagination cloud database publishing service. Click here to know more.
Creating the merged document
Finally, we’ll create the merged document. Begin the final step by clicking on ‘Create Merged Document’ within the Data Merge panel. All three tabs in this dialog box – Records, Multiple Record Layout and Options – require our attention.
Records: This is where we choose whether to have one record or multiple records on each page.
For our example catalog we’ll opt to merge ‘All Records’ and have ‘Multiple Records’ per document page.
We’ll also choose to generate an overset text report and set up an alert for missing images. These options can help us to identify issues that may occur during the document creation process.
Multiple Record Layout: This is where we establish how the records will be laid out during the merging process.
The Data Merge tool works in accordance with page margins. This means that a record that’s too big to fit within a page’s margins will be automatically placed on the next page.
Records can be paginated using one of two directions: ‘Rows First’ or ‘Columns First’. Rows First merges records left to right and then top to bottom, while Columns First merges records top to bottom and then left to right. The following image shows Rows First on the left and Columns First on the right:
The distance between each record is defined by the two spacing options: ‘Between Columns’ and ‘Between Rows’. Setting both options to 0 will cause the records to appear attached in the final result.
For our example catalog we’ll choose a ‘Rows First’ arrangement and 1mm of space between both the columns and rows.
Options: This is where we configure a few remaining choices.
There are five options for placing images during the merge:
- Fit Images Proportionally – Fit the image inside the Rectangle Frame tool box and maintain its proportions.
- Fit Images to Frames – Fit the image width and height to the Rectangle Frame tool box width and height; proportions will not be kept.
- Fit Frames to Images – Import the image with its original size and fit the frame to this size.
- Preserve Frame and Image Sizes – Import the image with its original size but do not fit the frame to this size.
- Fill Frame Proportionally – Increase image size proportionally until it has filled the entire frame.
Each option is shown in the following image:
Select ‘Fit Images Proportionately’ for our catalog. Also, select ‘Center in Frame’ and ‘Link Images’.
Does Data Merge have any limitations?
Data Merge is very useful for creating simple projects with repeating layouts. Learning to use this feature is quite easy, even for InDesign newbies, and it allows users to create complete documents in a short time.
Data merge can be a valuable first step to optimize your document workflow, increasing its efficiency and accuracy. But if your intention is to go further along the path of document automation, you could encounter some of the following limitations that are frequently mentioned from users who tried to use data merges in real-world document creation.
In this list, you will find, along with a description of data merge limitations, Pagination’s approach to addressing the issue, as well as some practical examples.
With Pagination, you can overcome the most common data merge limitations and make the publishing of your data accurate, fast, and flexible.
Data Merge Limitations
InDesign or InDesign Server?
Adobe InDesign Server is far less known than its desktop alternative. In this article, we outline what Adobe InDesign Server is, when to use it, and why and how Adobe InDesign Server is different from Adobe InDesign Desktop.