Data Merge InDesign Tutorial

 

This tutorial uses InDesign’s Data Merge tool to create a catalog.
The free project template is available here:


Download

Note: 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.

Check out our cloud database publishing solution.

 

 

banner2-pagina-templates

1.

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

image field settings

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.

save as formats

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.

banner3

2. 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).

show import options

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

import options panel
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 (text type) and image (image type).

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

map fields

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.

product style

3.1 Populating the layout

Assigning placeholders in the InDesign template can be quite complex.

banner-4-pagina-templates

4. Creating 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.

create merged document

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:

document merged directions

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.

document merged options

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:

image fitting options

Select ‘Fit Images Proportionately’ for our catalog. Also select ‘Center in Frame’ and ‘Link Images’.

4.1 Try a better approach

banner-templates

5. It’s done!

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

final document mergedfinal document merged

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.

Pagination.com

Pagination is currently the fastest way to transform your data into beautiful documents.
It assists the creations of hundreds of catalogs and price-lists daily.
Customers of any size, industry and from all around the world, use Pagination to:

1. Integrate data from any kind of source and business application;

2. Easily create custom templates;

3. Merge data and streamline publishing tasks.

Pagination offers an end-to-end premium service available 24/7 world-wide.

View more

Free templates

EmoCore-pronto

Files: InDesign + Excel + PDF
Size: A4 – 210×297 mm / 8.27×11.69 in
Automation: Pagination.com, Tutorial
Features: Full Document Automation, Image Import, Category breaks, Automatic TOC, Multi-pricelist, Table/footer notes

Indesign-to-Excel-01

Files: InDesign + Excel + PDF
Size: A4 – 210×297 mm / 8.27×11.69 in
Automation: Pagination.com, Tutorial
Features: Full Document Automation, Image Import, Category breaks, Automatic TOC, Multi-pricelist, Table/footer notes

indesign xml template

Files: InDesign + XML
Size: A4 – 210×297 mm / 8.27×11.69 in
Automation: InDesign XML – Tutorial
Features: Partial Document Automation, Image Import, Linked Data.

View more