Programming Excel to export to Access

  • Thread starter Thread starter Z
  • Start date Start date
Z

Z

Can someone point me to some online help for getting Excel and Access
to talk to eachother?

I have a spreadsheet that is updated daily, and I want to export
yesterday's data to a database for archiving purposes. The Excel
macro should copy some data, open the database, open a table and paste
the data to the end of the table. All of the data is unique (or
should be), so duplication shouldn't be a problem.

Thank you for any help!
Z
 
One thing you can do is link a table in the database to
the Excel spreadsheet. This will update the table
whenever changes are made to your spreadsheet.

If unsure how to do this, go to File - Get External Data -
Link Tables - Select Excel from the Files of Type -
Browse to the spreadsheet and let the Wizard walk you
through the rest.
 
This might be a help for getting data to and from Excel and Access: It
includes examples of using variables in SQL queries.
http://www.bygsoftware.com/examples/sql.html

Or you can get there from the "Excel with Access Databases" section on page:
http://www.bygsoftware.com/examples/examples.htm

It demonstrates how to use SQL in Excel's VBA to:

* create a database,
* create a table and add data to it,
* select data from a table,
* delete a table,
* delete a database.

DAO and ADO files available.

You can also download the demonstration file called "excelsql.zip".

The code is open and commented.


--
Regards
Andy Wiggins
www.BygSoftware.com
Home of "Save and BackUp",
"The Excel Auditor" and "Byg Tools for VBA"
 
I'm unsure how your suggestion will help the OP archive the data on a
daily basis. Surely a linked table in MS Access will always show the
current data in the spreadsheet, rather than persist yesterday's data?

--
 
Back
Top