I am looking for a free way of changing a .mdb(access) file to a .csv(comma delimited file). any ideas out there?
EDIT:
I need to be able to convert a large amount of .mdb files... So something automated would be nice.
|
I am looking for a free way of changing a .mdb(access) file to a .csv(comma delimited file). any ideas out there? EDIT: I need to be able to convert a large amount of .mdb files... So something automated would be nice.
| |||||||
feedback
|
|
You can use mdbtools to export the Access file to CSV. This blogpost covers how you can automate them using Python | |||||
feedback
|
|
MS Access database files are containers of complete databases including schema, indexes and table data. A .csv file should be a dump of one single database table to be of any sane use. You usually shouldn't want sort of a filetype-to-filetype converter but rather a way to extract the information from the Access database that you want in a .csv file. If you have MS Access available you can just open the database in Access and right-click each table and choose "Export". In the file dialog you can choose the format to export to, which will include plain-text formats such as .csv. In case your installation or version of Access doesn't directly support exporting to plain-text formats, you can follow rjmccann101's advice and export to an MS Excel workbook first which will work even with the oldest versions of Access. Alternatively, you may specify queries on your tables and export their results the same way. Apart from that, Access data files are self-contained databases. If you don't have a copy of MS Access at hand but only the .mdb file, you can connect to it and query the table data using SQL, for example using a simple Perl script:
| |||||
feedback
|
|
Check out this StackOverflow thread:
| |||
feedback
|
|
I've only got Access 2007 available here but Export to Excel and save as CSV should work. | ||||
feedback
|
|
For mass-processing I'd recommend a script like this (example in Perl):
This will "convert" each .mdb file into a group of .csv files being named after their database container (the .mdb file) and the table name. If you don't need actual comma separated values but rather pipe, semicolon or whatever separated data, just edit the print statement accordingly. The example requires all your .mdb files to reside in the same directory which is hard coded in the $dir variable, but this can easily be changed so that you can hand over directory names or individual .mdb file names on the command line. Note that the example is not robust or failsafe in any way, I left out any error detection and correction for the sake of readability. | ||||
|
feedback
|
|
You might want to check out a tool I wrote called PlaneDisaster.NET. It won't export the files en mass, but its open source, and if you know C# it would be a good starting point for a program that does such. | |||
|
feedback
|