juandesant, (edited )
@juandesant@astrodon.social avatar

If you need to export a Microsoft Access database while on macOS or Linux, this might do the trick:

  1. brew install mdbtools
  2. pip install pandas_access
  3. In a Python session:
file_name = ‘path_to_access_file.mdb’  
for table in mdb.list_tables(file_name):  
 df = mdb.read_table(file_name, table)  
 df.to_excel(f'{file_name}-{table}.xlsx')  

You're welcome! (Including myself in the future…)

See also https://gist.github.com/juandesant/e77b00bccf6cfda04abc3467e75f2531

richardvenusfo,

@juandesant Which Access version was that one?

juandesant,
@juandesant@astrodon.social avatar

@richardvenusfo not sure, but the file must be around 5 to 10 years old. Will check it when I’m in front of the computer and report back.

juandesant,
@juandesant@astrodon.social avatar

@richardvenusfo used the online file identification tool from https://www.toolsley.com/file.html (which leverages libmagic) and it just says “Microsoft Access database”, does not provide versioning information.

juandesant,
@juandesant@astrodon.social avatar

@richardvenusfo in any case, the underlying engine to the tables is provided by libmdb 1, and from version 0.9.3 (currently at 1.0) claims compatibility with Access 2013/2016/2019.

richardvenusfo,

@juandesant thanks...so recent versions

juandesant,
@juandesant@astrodon.social avatar

@richardvenusfo but probably the earlier versions might be also supported…

richardvenusfo,

@juandesant I doubt it, but it will be good to try

juandesant,
@juandesant@astrodon.social avatar

@richardvenusfo you can install just MDBtools first, and then use mdb-export, and see if it works. Depending on what you need, mdb-sql would also be useful, without needing Python. If those tools don’t work with your file, there is no need to install pandas_access.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • python
  • DreamBathrooms
  • everett
  • osvaldo12
  • magazineikmin
  • thenastyranch
  • rosin
  • normalnudes
  • Youngstown
  • Durango
  • slotface
  • ngwrru68w68
  • kavyap
  • mdbf
  • InstantRegret
  • JUstTest
  • ethstaker
  • GTA5RPClips
  • tacticalgear
  • Leos
  • anitta
  • modclub
  • khanakhh
  • cubers
  • cisconetworking
  • megavids
  • provamag3
  • tester
  • lostlight
  • All magazines