Learn how to work with Data Merge in InDesign to import large amounts of data and create files with varying variables within the same design. This article provides a step-by-step guide on how to import data from a CSV file, manipulate various variables, and preview the final product before exporting.
Key Insights
- Data Merge in InDesign allows for the importation and manipulation of large amounts of data such as names and addresses to create multiple variations of a single design.
- You can import data from CSV files into InDesign. Each CSV column is defined by a comma, allowing for the easy categorization of data such as business names, first names, last names, and addresses.
- InDesign allows for a preview of the final product including how the imported data will appear in the design. You can also adjust and modify the data format and design before exporting the final product.
Note: These materials offer prospective students a preview of how our classes are structured. Students enrolled in this course will receive access to the full set of materials, including video lectures, project-based assignments, and instructor feedback.
In this video, we're going to be working with Data Merge. Data Merge gives us the opportunity to import lots of names, addresses, or other materials and create files for each of those different variables.
Rather than creating a new postcard for each individual, this allows us to export multiple versions of the same design but with different variables. So let's actually put this into practice. We'll go to Window, and from Utilities at the bottom, let’s open Data Merge.
Here, we can see that we have our three Data Merge elements, and let's move them to the bottom right under Color and Stroke. We'll then open up Data Merge, and from here, we now need to import the data that we'll be utilizing. If we open our main folder, we'll see that we have both a CSV and an Excel sheet.
If we look at the Excel sheet, we'll see that it contains multiple tabs, each with names, last names, addresses, and businesses—similar to how a business might collect contact information. In addition, if we open the CSV file, which is one way to export the Excel spreadsheet, the data is separated by commas rather than columns. In this case, we have all the business names in the first field, followed by a comma, then the first name, comma, last name, and so on.
InDesign is able to use a CSV file to import data. So let's close this out, and we’ll actually import the file. To do this, we're going to click the menu icon (three lines) in the top-right of the Data Merge Panel, and go to Select Data Source.
From here, we'll go into the Domus Interior Design folder, and the only readable file we can use is our domuscontacts.csv. We'll click Open, and right away we can see the first row, which defines the field names separated by commas. To utilize this, we’ll go to the top of the layout, and let’s highlight Business Name. With Business Name highlighted, we can now insert it, and we'll see that the placeholder Business appears—this will be replaced with actual data.
Let’s hit ENTER and remove the rest of the placeholder text by hitting the Delete key. Next, let's add First Name, click to insert it, then add Last Name. Hit ENTER again, then insert Address Line 1, hit ENTER, add Address Line 2, hit ENTER, and add Address Line 3. We now have the full format of the data we’re going to insert—let's preview it.
We can check Preview, and we’ll see what it actually looks like. This looks pretty good. We’ve got our business name, first and last name, address, second line, and city/state details.
In addition, we notice that the name doesn’t have a space between the first and last names. So let’s uncheck Preview, add a space between the two fields, and then recheck Preview. We now see a space between the first and last names. In addition, we can stylize the formatting by selecting the placeholders.
For example, if we want the business name to be bold, we’ll select “Business” and change the font from Chivo Regular to Chivo Bold. If we want to add some spacing after the first and last name, we can go to the Properties Panel, locate the Space After setting, and increase it slightly.
Finally, let’s select all the text and center the paragraph. This way, everything is nicely centered on the postcard. Returning to Data Merge, if we uncheck Preview, we’ll see that our style changes apply to the entire format.
We can also preview all the entries by clicking the right arrow in the Preview area. As we cycle through, we may notice a few formatting issues. For instance, if the second address line is blank, a large gap appears between lines.
To fix this, we’ll uncheck Preview, click the menu icon again in the Data Merge Panel, and go to Content Placement Options. Here, InDesign gives us the option to remove blank lines for empty fields like Address Line 2.
We’ll click OK. Let’s check Preview again, and if we navigate through a few entries, we’ll see that most of the formatting looks good. However, for the entry “Phase 10” Construction, the name doesn’t fit on one line.
This preview feature is helpful for identifying formatting problems before exporting. To resolve this, we’ll use the Selection Tool, and holding ALT, drag the text frame wider and lower so that the content fits within the guidelines. Now, when we preview again, everything looks good.
Click outside the text frame, uncheck Preview, and hit CTRL+S on the keyboard to save your work. In the next video, we’ll export all of our postcards.
See you there!