3

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.

2

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.