Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Import text file to access database via Excel VBA
Is it possible to import a text file into an access database via Excel.
The Access Table that the file should be imported already exist - it just should be emptied of data and populated by the new data from the text file. Thank you Dan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Import text file to access database via Excel VBA
You neede a macro to write to an Access Database from Excel. You can import
data directly in Access from a file witout using Excel. You can query a Database from excel without a macro. there are different methods that can read/write to access using a macro depending the version of access that was used to create the database. The two main ways of access the database is using the ADO or DAO methods. I usually refer to the Access VBA help menu along with a book I bought. when access the database from excel I create an Access Application and then use ACCESS methods to read and write the data. You also need to add refernce libraries to the excel vba (tools - references) Add the following references Microsoft Access 11.0 object library (or latest version) Microsoft ActiveX data ojects 2.8 library (for ADO method, use latestt library) Creating and Access object in excel vba Set obj = createobject("Access.Application") or open an existing database set db = GetObject("c:\temp\dbase1.mdb") "Dan" wrote: Is it possible to import a text file into an access database via Excel. The Access Table that the file should be imported already exist - it just should be emptied of data and populated by the new data from the text file. Thank you Dan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Import from Excel to an access database using Jet in vb.net | Excel Programming | |||
Database query to import from Access to Excel | Excel Discussion (Misc queries) | |||
How to import multiple sheet of excel into Access database to a diffrent tables?? | Excel Discussion (Misc queries) | |||
Import to excel Access database directly to a variable (not using sheets) | Excel Programming | |||
automatic import of .csv file into access database | Excel Programming |