okay next I want to show you how to
import data from an Excel spreadsheet
into your access database Microsoft and
Excel and Microsoft Access uh work very
well together so let's see how we're
going to import data from an access uh
from an Excel spreadsheet into your
access database so I want to go down to
Excel and just show you something for a
second okay here's the data in Excel and
notice how the first row contains your
field names um that's not necessary but
it sure does make it work better when
the first row of your Excel spreadsheet
contains your field names and then each
row after that is a record and each
column is a field so this kind of data
would import very nicely into um into
access in Excel we would call that a
list or a table or a database right so
we kind of using those same words that
that axis
uses first R has your field names the
rest of is have your record so let's
close out of excel
now and let's go back into
access okay so in this version you're
going to pick on uh the external data
tab in previous versions of axis you
would pick on the file menu and then it
would say get external data uh here
you're going to pick on external data
notice how you have Imports and you have
exports all right so we're going to pick
on the import section and notice how
Excel is built right
in now you're going to get to this
screen uh so first of all we're going to
do a browse and point to that exact same
Excel spreadsheet we were just looking
at that's going to open up Windows
explore mine happens to be into my
documents folder but otherwise you would
just browse to any other folder using
Windows Explorer let's go get that one
that was called test
data uh now here's some important
choices if you pick on M Port it's going
to make a copy of that table into the
access database but then it would have
two distinct copies of the data one in
Excel and one in Access when you do an
import if you change the data in Excel
it will not change the data from access
and if you change the data in Access it
will not change the data in
Excel well when we say append a copy of
the records to another table so it would
take the data from the Excel spreadsheet
and add it or appended to the bottom of
an existing table so that that's one way
to kind of combine your uh your your
Excel spreadsheets into one larger table
as you you import the first one and then
you pend all the other ones and make one
large table out of your your different
sheets in
Excel now here's a version that says
Link Link means that U it will make a
copy of the data in axis but if you
change the data in axis it'll also
update the Excel spreadsheet and if if
you change the data in the Excel
spreadsheet it'll change the data in the
access database so import did not do
that but link would actually tie them
together and keep them tied together
we're just going to do an import right
now so I'll click on
okay all right so uh now you're on the
import spreadsheet wizard as we can see
up here from the Excel workbook we can
either import the worksheets you know
like sheet one sheet two and Sheet three
or we can also do named rang
so if the Excel workbook had named
ranges you can import from those as well
in this case I'm going to pick on sheet
one and then we're just going to pick on
next at the
bottom uh now in this case it's telling
me that one of my items in the first row
doesn't have a valid field name but uh
this data should work just fine I'll
click on okay I'm not worried about
that okay now it says Microsoft Access
can use your column headings as field
names for your table does the first
specify contain your column headings if
you remember I just showed it that it
does so I to I'm going to make sure that
that's checked now that'll become the
field names in the axess table and then
all the other records will be the uh the
records in the axis table so we're
looking good there pick on
next now in this screen you could change
the field names as they're going to
appear in axis if you wanted to you can
click on any one of these columns and
then up here you can change the field
name here you can make it an indexed
field which which would mean it's a it's
a permanently sorted
um it's a permanently sorted field so uh
there's going to be another video about
indexing and primary keys in this series
uh so here you can make one of those
fields a um uh an index field if you
wanted
to you can change the data type of the
field and that's how it'll appear in the
access database you can even skip that
field and not import it so you you can
do those choices is field by field as we
can
see but a lot of times you don't have to
change anything here it'll just take the
defaults from Excel we'll pick on
next now here it's talking about a
primary key so there is another video uh
in this series about primary Keys
primary key is going to be a unique
identifier so we can let access add the
primary key which will be uh where we
add one of those Auto numbers
automatically uh if you already have
unique field something that's different
for each record you would choose your
own primary key and then pick one of
your Fields I don't really have anything
like that in the Excel spreadsheet so I
want to say let access add the primary
key or we can say no primary key usually
I would I would suggest that you pick
one of these top two so we're going to
let access at the primary key you can
see it put an auto number into that
record we'll pick on
next now you want to give that table a
name in the access database so in this
case case uh those were Airline
transactions so that's what I'm going to
call the table Airline uh
transactions and I'm going to pick on
finish
here okay now it it was able to import
that as we can see made a new table
called Airline transactions from the
test data Excel spreadsheet it says do
you want to save these import steps this
will allow you to quickly repeat the
operation without using the wizard so
that means if you're going to import
from that same spreadsheet on a regular
basis it can make it really easy for you
to do that I'm going to pick on Save
import steps and then it's asking for a
name of the import steps and I'll show
you where those are going to occur you
can even this is pretty powerful they
they just came up with this for this
version you can even create an Outlook
task that would schedule that on a
regular basis and then do that import
for you on a regular basis so in this
case I want to say save import
now let me show you where you would find
the save Imports we're going to pick on
external data and then over here you
have your saved
Imports and you certainly you can have
more than one of those we could have
saved Imports we can have saved exports
but notice I can just click on that and
it will it would actually repport right
from the Excel spreadsheet and do that
same exact thing so that's a really
quick and easy way to repeat that
step I want to click on close here now
if we go to the airline transaction
table I'm going to double click on
that now it's just like any other access
table if you notice down here we have
202 records it got the field names from
the Excel spreadsheet and then there's
your
data okay so uh that's how we're going
to import from the Microsoft Excel a
Microsoft Excel spreadsheet into
Microsoft Access