Recently I had the mission of creating all atendee badges for the NordicAPIs conference. It involved putting in information (name, company, twitter handle) of every attendee into an illustrator file. Not fun. I vaguely remembered having read about a way to input data into illustrator using XML, but I had never really used it.
Google pointed me to this tutorial by Cheryl Graham where she explained the basics, but I had problem after problem trying to convert my data to an XML format that Illustrator would understand. Since apparently I’m not the only one that has torn her hair out trying to make this work, I decided to write down what worked for me, so that others keep their full hairdos. I’ll assume you have your data in a format such as Excel or CSV (comma separated values), and we’ll use an illustrator script to turn it into XML for Illustrator to use.
NordicAPIs is using EventBrite to manage their ticket sales, and you are able to easily export all attendee information from their site. I exported as a .csv file, though I suppose an .xls file would have done just as well. I opened it up in a spreadsheet editor (in my case Numbers, but Excel works too.). In there I cleaned up the data: I arranged the attendees alphabetically and I deleted all the columns that I did not need for the badges. It is important to leave the headings on each columns, as those will be the variable names for illustrator. Leave or add an extra column in the first place that will be the name of each data set. A data set is each individual group of variables associated with, in this case, one attendee. For example, if my data set is Name, Twittername, Company, I will add a column before Name with either simple numbers (1-120), or I will duplicate the Name column and rename the header to something like dataset. If you don’t do this, the first column will be used as the name of each dataset, and you won’t be able to use it as a variable.
When your data is formatted and sorted as you want it to be, export it as a CSV file.
There is now an improved script for importing variables from a csv file. You can find it here:
I’ll update instructions when time allows.
For the next step, you need to download an illustrator script called JET_VariablesFTROU (that’s Variables For The Rest OF Us). If you read “script” and your brain froze in panic thinking “But I’m not a programmer! I don’t know code!”, don’t worry. All we’re gonna do is find and replace one little thing and then illustrator will take care of the rest.
Unzip the file you downloaded and extract the .js file to any temporary location. Then open it up with your favorite code/text editor (notepad, textEdit, dreamweaver…). Look for line #3. It says:
var tabChar=" ";
Change it so it says
Now open up Illustrator. Create a new document. In it, make an empty text field. Open up your variables csv document in a text editor, select all the text and copy it. Paste it into the text field in your illustrator document. You should just have a list of comma separated values. Select the text field. Now go to File >Scripts>Other Script and find the JET_VariablesFTROU.js that you saved and edited. It will take a while to process the variables, meanwhile you will see another text field with changing text. When things stop changing, go to View>Variables. You should be able to see your variables and go through each dataset using the dropdown on top of the pallette. On the palette menu, you can select “Save Variable Library”, and then be able to use your data in your file.
Do you want to know how to set up a file to use the XML variables we just created? I’ll leave the explanation to Cheryl’s Tutorial.
Here is the full documentation of JET_VariablesFTROU