New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Creating an external data set

From: Design the Web: Automating Web Graphics

Video: Creating an external data set

Now we're going to create an external text file, or a CSV file that's going to So let's start with the city name. So let's type Aruba, then a comma, then $649, then a comma.

Creating an external data set

Now we're going to create an external text file, or a CSV file that's going to hold all of the values for a data set external from the Photoshop file. So first let's switch back to our Exercise Files, and let's come over here and open banner_data.csv up in a text editor. Now as I mentioned earlier, this is just a text file, and it's largely blank except or this little sentence here. So let's come in here and delete this, and what we need to do define our data set in this CSV file or comma separated value file is to define all of the variable names and we're going to separate those by a comma.

And these need to match what the variable names are inside of Photoshop. So let's start with city comma space then price. Then a comma, space, then photoBase. Comma, space and then photoClip. So again, these variable names separated by a comma, match exactly the variable names that we defined inside of Photoshop. So now every line after is going to define a data set. So let's hit a Return, and we're first going to define the same data set for Aruba. So let's start with the city name. So let's type Aruba, then a comma, then $649, then a comma.

Then we're going to point to the Aruba JPEG, which is inside of the photos directory. So we'll type photos/aruba.jpeg. Comma, space. And then we're going to assign this same JPEG to the photo clip. So photos/aruba.jpg. Once that's in place, choose File > Save. Let's come back to Photoshop. Let's come under the Image menu. Let's come down to Variables. Let's come down to Data Sets. And what we're going to do inside of this dialog box now, is import custom sets of data.

Let's come over here to the right, let's choose Import. And from the Import Data Set, let's come here and choose Select File, from the desktop > Exercise Files, let's choose banner_data.csv, then click Open. Next inside of the Import Data Set dialogue box. Let's come down here and choose use First Column For Data Set Names, that way the city name will also be the data set name. And let's choose Replace Existing Data Sets, then click OK, so now we can see we have a data set named Aruba. And if we look down here we see all of the exact same value names, and we can also see the same data showing up here.

So now we have Photoshop doing the same thing we were doing before, but instead we're loading the data from that text file. So now let's click OK here. Let's go back to our text file and let's define another data set. So let's hit a Return. This will create another data set. Let's type in, Washington, D.C. Now Washington D.C. does have a comma in the file name and we'll talk about that in a moment. So after D.C. we'll hit a comma space, $699. Comma, space. Let's point to the Washington D.C. JPEG. So, photos/washingtondc.jpg.

Comma, space And then we'll point to the same JPEG file for the second time for photoClip variable. So now let's hit Save here, so let's go back to Photoshop. Let's come under the Images menu, down to Variables then Data Sets. Let's come over here to the right choose Import, Photoshop will remember the last file, so you can simply click OK here. And then we're going to get this dialogue box here, which is going to tell us that there are too many variables inside of here. So the problem is that Washington DC has a comma in its city name. Now this is confusing Photoshop because it's using commas to separate the values.

So let's choose OK here. Let's leave the Variables dialogue box up. Let's comeback to our text file, and what we need to do is somehow specify to Photoshop that this is the full name of that variable. So what we can do is come in here and put quotes around Washington D.C. This basically turns this into a string literal. So we're telling Photoshop, this is the value inside of the quotes of the first variable for city. Let's hit Save. Let's go back to Photoshop inside of our Variables dialogue box. Choose Import, click OK.

Now Photoshop sees the string literal of Washington D.C. as one value for the variable name. Now, it's a C multiple data set, so let's come over here next to Aruba. Let's click on this drop-down menu and now we'll see a representation of each data set in this drop-down menu. So if I just choose Washington D.C. On the main stage we can see the background graphic changes, the text for Washington D.C. changes, and the price changes. So now, in this Variable dialog box, we can switch between Aruba, which will pull in different JPEGs and different prices and city names, and Washington DC. So now, with our data sets working properly, let's come back to our text editor and let's add in some more data sets.

After the Washington D.C. data set, let's hit a Return and let's come in here and add three more. We'll start first with San Francisco. Let's set the price of this to $749. Then we'll point to the San Francisco JPEG file, two times. Once for the photoBase variable, once for photoClip. Next, the city's going to be Breckenridge. We'll set the price on that to $899, and then we'll point to the breckenridge.jpg file, again, both for the photoBase and the photoClip variables. And then lastly, Amsterdam. We'll set that price to $950.

And we'll point to the Amsterdam.jpg for both of the photo variables. Once that's complete, save your text file to Photoshop. Inside of the Variables dialog box, let's come down and choose Import again. Click OK. Again, Photoshop remembers that text file. And now, when we come over here to the Data Sets drop down, we'll see all of the different data sets. So, lets choose San Francisco. Then Breckenridge. Now inside of Breckenridge. Since we have a lot of white snow at the bottom. I, I put a blue fated bar in the actual JPEG file itself. So, this is giving us the illusion of an extra design element but it's actually in the JPEG.

And then lets come down and choose Amsterdam. Now, at this point, we have five completely customized banners being generated from Photoshop and that external data. Now one thing you'll notice is that all these banners have the same elements. They all have the city, the price and the two photographs. Next we'll talk about how to add some unique elements into the individual banners and then turn those elements on and off based on those data sets.

Show transcript

This video is part of

Image for Design the Web: Automating Web Graphics
Design the Web: Automating Web Graphics

8 video lessons · 3880 viewers

Chris Converse


Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes changes my life forever. @JosefShutter
@lynda is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold

Are you sure you want to delete this note?


Thanks for signing up.

We’ll send you a confirmation email shortly.

Sign up and receive emails about and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from

Sign up and receive emails about and our online training library:

Here’s our privacy policy with more details about how we handle your information.

submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.