Recently, the SITCON Hour of Code programming event has ended! We are also preparing thank-you notes for the teaching assistants.
This time, we asked 小妘 to help design the template, so I want to record how to import Excel data and apply the template in Indesign.
Prepare Excel document
First, we organize the data in the Excel document and put the “data name” in the first row.
The data name here will replace the text in Indesign, so it is strongly recommended to use English.
And save the data as a CSV text file in Unicode or UTF-16 (macOS user only) format.
Import Excel data
Open the designed template and start importing the CSV text file downloaded just now.
Click “Utilities” in the “Window” and select “Data Merge”.
Select data source.
After completion, you will see a screen like this.
Replace the text in the template with “data name”. The concept here is similar to variables.
Finally, click “Create Merged Document” to generate an independent Indesign document.
Output PDF format
After confirming that there are no errors, we can export these documents in PDF format!
Click “Adobe PDF Presets” in “File”, select “[High Quality Print]”, and then save the document to the desired location.
Indesign displays garbled characters when importing CSV data
This problem is mainly caused by the encoding of the CSV file. If you are a macOS user, you can use the following command to check and correct it.
# Check encoding file -I <file name> # Convert encoding iconv -f utf-8 -t utf-16 <file name> > <new file name>