- [Narrator] In this movie
I'll show you how to import a spreadsheet file.
Now here I happened to be working inside Microsoft Excel,
but it could just as easily be
Apple's Numbers application or Google Docs online.
Anything that allows you to save off a
tab-delimited text file.
Now I want to stress that all of these numbers
are totally made up,
but they do have some structure.
So column A includes a few years,
and then columns B through F are percentage values.
Now notice that I've saved the file as an XLS document
which is Excel's old data file format,
which is compatible with just about every program out there.
Alright, so I'll go ahead and switch back to Illustrator
and I'll click on a graph with my black arrow tool
to select it, and then I'll right click anywhere inside
the document window and choose data.
And now, I want you to notice right next
to the text entry field, we have this icon
labeled import data.
Go ahead and click on it,
and then I'll navigate to my Exercise Files folder,
which I have on my desktop,
and I'm looking for the 37 pictographs sub folder
at which point I can see my file right there,
Social media data.xls, and to open it,
I'll just click on the open button.
At which point, I'll see an alert message.
Now the thing you have to bear in mind
about graphing inside Illustrator
is that it's a very old feature.
It was first introduced in Illustrator 5.0
and it really hasn't been updated much in the years since.
And so as a result, this alert message
may not make a lot of sense.
It says, cannot import the graph data,
alright so far so good,
the file couldn't be found.
Well, we just saw the file a moment ago
so obviously, Illustrator is able to find it just fine,
the problem is that it's locked
because it's open inside Excel.
And so the solution is to click the OK button
and then bring Excel up on screen
and go ahead and close that file.
Now back here inside Illustrator,
go ahead and click on the import data button once again,
then, if you're working along with me,
navigate to that 37 pictographs file
and go ahead and open the XLS document once again.
At which point, something truly weird happens.
Now depending on which version of the program you're using,
you may see an alert message that tells you,
Illustrator cannot open XLS documents.
But in my version of Illustrator,
I'm seeing this nonsense text in the very first cell
and then I see
the letter C, in the second cell down,
and if I were to expand the size of the spreadsheet,
and then scroll down the list right here,
then I'm going to reveal a bunch of
additional weirdness.
And so, what you really want to do is
click on the revert button,
because if you click on the check mark instead,
you're going to end up getting
this absolute disaster right here.
Notice if I scroll over that,
I've got a lot of garbage going on.
And so to get rid of that stuff,
you want to go up to the Edit menu
and choose the undo command.
Or just press Control + Z
or Command + Z on the Mac.
And if that doesn't work as it didn't in my case
then you need to close the spreadsheet like so,
and then return to the Edit menu and choose
Undo Graph Data OK, or again just press
Control + Z or Command + Z on the Mac,
and that should take care of the problem.
Alright, now I'll go ahead and right-click again,
once again choose the data command
to revisit the spreadsheet,
and I want to show you something here.
Let's say I click on some cell
other than the first cell inside the spreadsheet,
and once again click the import data button
and navigate to that 37 pictographs folder.
This time I want to load this file,
Tab-delimited data.txt,
which is a plain text file in which each one of the values
is separated from its neighbors by a tab character.
And that is a standard export or save option
inside Excel and the other spreadsheet programs.
Alright so, with that file selected
I'll go ahead and click on the open button.
Now what I want you to notice here
is that I've gone ahead and imported the data
at that click point,
which is actually a really useful feature
because it means that you can import
more than one spreadsheet file if you like.
In my case, it's not really what I want though,
so I'll just go ahead and drag from year
to this value 36 under the Twitter column,
and I'll press Control + X or Command + X
on the Mac in order to cut that data,
and then I'll go ahead and scroll back
to the very first cell, click on it in order to select it,
and I'll press Control + V
or Command + V on the Mac,
to paste that cut data.
After which way, I'll click on the check mark
in order to update my graph.
Alright I think now pretty obviously,
this isn't quite the effect I'm looking for.
Notice that I'm not only graphing Twitter,
Pinterest, LinkedIn, Instagram, and Facebook,
I'm also graphing that first column
which are the years.
And because the year values are so much bigger
than the other ones,
we're ending up with these very long bars
followed by extremely short ones.
And so what we need to do is modify those years
in order to convert those values
into a category access and I'll show you how that works,
in the very next movie.