Data Merge InDesign Tutorial

This tutorial will show you how to create a catalog using InDesign’s Data Merge tool.

  • You can buy the project template from the button above.

One of Data Merge’s main weaknesses is the need to prepare spreadsheets to InDesign’s exact import specifications. Only CSV and TXT files can be imported, and the conversion process can be daunting, complex, and prone to errors.

Pagination offers solutions to overcome conversion issues. 

Table of Contents

  1. Preparing the data source
  2. Setting up the Data Merge panel
  3. Mapping the fields
  4. Creating the merged document

 

Data Merge InDesign Tutorial

Preparing the data source

Open up 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 an @ symbol prefix (e.g. @Image). The @ symbol is a special character in Excel, so add an apostrophe before the symbol if you’re presented with an error (e.g. [email protected]). 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, e.g.

On a Windows system – C:UsersUser NameMy DocumentsImage.psd
On a Mac system – Macintosh HD:Users:User Name: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.

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.

Setting up the Data Merge panel

Open the Data Merge panel via Window > Utilities > Data Merge > Select Data Source. Now choose your .csv or .txt file and check the ‘Show Import Options’ box (shown below).

Click ‘OK’ and take a look at the new dialog box that appears:

Change the 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.
  • 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.

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.

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.

Creating the merged document

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 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’.

It's done!

Now click on ‘OK’. A new document will be created and all of the records will have been merged!

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Limitations

Most mentioned Data Merge limitations include:

  • Cannot group elements;
  • Cannot handle moderately large datasets;
  • Few data-specific error messages.

To overcome these limitations Adobe suggests to use XML-Import, but there is a powerful solution that help you create your documents faster and easier, and is called Pagination.

View More

Create a free account!

Use our free InDesign templates or upload your own project.
Create unlimited documents.