Importing/Updating Data from Excel

  • Thread starter Thread starter Josef
  • Start date Start date
J

Josef

i am wanting to import data from an excel s/sheet into access tables.

i have noticed that when i use the DoCmd.TransferSpreadsheet, it will
paste/append the data to the specified table.

are there any procedures that will enable me to update the current table
with the imported data from excel.

thx
 
If you have a key value to which you can relate both data
sources, you can run a query that updates one table to
the values of the other after you import the data.

-----Original Message-----


i am wanting to import data from an excel s/sheet into access tables.

i have noticed that when i use the
DoCmd.TransferSpreadsheet, it will
 
what is the most efficient method here. i will have records that require
appending and records that require updating, all from the same excel
s/sheet.

thx
 
I would say to just import the data (or link) and then
you can program procedures to handle whatever you want to
do. I assume you have a flag or some other way of
determining which records are to be updated and which are
to be appended.
You could run a query that updates all the records in
your DB to match those in the XL file (filter using your
update/append flag), and run a query that adds new
records from your XL file to the DB based on how you have
them flagged in the XL file.
If the XL file is always in the same place and format,
you can simply link it and have Jet manage the connection
so you don't have to go through the import process each
time.
 
Back
Top