I am looking for a way to mimic the "Get External Data" in Access 2007 (accdb) using Python. I am trying to import data from a MDB to a ACCDB. Basically I don't want to do this manually each time, but incorporate it into my Python workflow.
Asked
Active
Viewed 727 times
3
-
May be of interest: http://stackoverflow.com/questions/2559659/accessing-a-jet-mdb-database-in-python – Fionnuala Jul 20 '12 at 20:49
-
operating system is Windows 7 – dklassen Jul 24 '12 at 17:22
1 Answers
0
Assuming you are on a Windows-machine:
You can automate the "Get External Data"-task by using VBA. Dive into the documentation of the TransferX (TransferText...) methods of the DoCmd-Object in VBA. So before using Python, I would recommend you should program a working VBA-solution for your task.
After that, you can try to use the Win32 Extensions for Python. These offer some COM-Interop classes you could use. Probably this piece of code in Python would be the starter for you:
import win32com.client
acc = win32com.client.Dispatch("Access.Application")
...
With this at hand you should be able to transfer your VBA-Code to Python.

AndyG
- 39,700
- 8
- 109
- 143

Benjamin Brauer
- 368
- 1
- 5
- 19