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 · 3955 viewers

Chris Converse
Author

 

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 Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com 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 lynda.com 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.com (@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
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Design the Web: Automating Web Graphics.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com 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 lynda.com.

Sign up and receive emails about lynda.com 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.