How to extract a table from a Microsoft Access .mdb file

Posted on 2010-04-04

I recently needed to get a list of area codes mapped to states in csv format. The NANPA has the data (for free), but only as a Microsoft Access .mdb. Here's how to extract the data using mdb-tools.

First, figure out the table name from a dump of the schema:

mdb-schema _database_.mdb

Then export it:

mdb-export database.mdb tablename

The NANPA table has spaces in the name, so you have to put double-quotes around it.

Tags: csv mdb msaccess msoffice NANP areacodes