
- Image 1: CSV Headers - Claire Ryan
Adobe Indesign's Data Merge function is designed to take a large selection of data and format it according to a template to make it ready for printing. It significantly eases the job of the designer by allowing a number of records to be processed as a batch - for example, a set of address labels.
Preparing the CSV file
The Data Merge requires a CSV file of records arranged in columns and rows, with the appropriate headers at the top of each column. This can be set up in Microsoft Excel. (See Image 1.) The address must be arranged with each row representing a new record. The headers are used in Indesign to identify each line of the address.
Once the list of records have been added, the file must be saved as a .CSV file instead of the usual .XLS Excel format. This can be done by using the drop-down list in the Save File dialog box to choose the Comma delimited file type. (See Image 2.)
Importing the CSV file Into Indesign
In Indesign, the Data Merge tool is listed under Automation in the Window menu. The CSV file must first be imported into this tool through the Data Merge context menu. (See Image 3.) The Select Data Source option will bring up a browser window where the CSV file may be selected. If the file is imported correctly, it will be listed in the Data Merge window and the headers will be visible.
Note that Indesign cannot import the CSV file if it is still open in Excel, and if there are no headers, it will not be able to read the information correctly.
Adding the Address records to an Indesign Template
Although it is possible for a user to design their own address template in Indesign, it is far more convenient to use a pre-made template that corresponds to a set of printable address labels such as the Avery series. These templates can be downloaded from Adobe Exchange.
Once the template has been opened, the headers in the Data Merge window can be clicked and dragged into the first text box of the template. (See Image 4.) The headers become placeholders which are then treated as normal text, and can be formatted as such. Other text can be added around the placeholders as needed.
Completing the Data Merge
Once the address is formatted and all required headers have been added, the Data Merge tool is used to automatically generate a new Indesign file based on the template and the CSV records. This is done by clicking on the Data Merge options (see Image 3) and choosing to merge all records with multiple records per page. (See Image 5.)
Clicking on the Preview Multiple Record Layout box will instantly generate the first page of the new file, and is useful to see if the records will be formatted correctly. Once the user clicks OK, Indesign will then merge all records in the CSV file into the address template, and produce a new Indesign file with a complete set of ready-to-print address labels.
The Data Merge tool is especially useful for designers that work with a customer database, as it allows batch formatting and printing of hundreds of records at a time. It can also handle images, and may be used to automatically generate simple product catalogues based on a single format.
