Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert MDB to CSV [closed]

Tags:

ms-access

I have a MS Access mdb file. I need to convert it to a CSV file. How do i do it? Please do not point me to any freeware.

Thanks in advance

like image 514
Rajdeep Avatar asked Jun 02 '11 07:06

Rajdeep


People also ask

Can I Export from Access to CSV?

Transfer Access data to Text and CSVHit the Text File button. Hit the Export data with formatting box. Make sure you hit the Open the destination file.. checkbox so that your Excel will open after the data transfer is done.

How do I open an MDB file in Excel?

whether the db was created in Old or New version of MS Access, you can view the data using Excel. Use Data->Get Data->From Database, and select your . mdb.


2 Answers

Another useful tool is mdbtools:

http://mdbtools.sourceforge.net/

like image 180
oz123 Avatar answered Sep 18 '22 14:09

oz123


Being no freeware, as you requested, I could recommend you Spectral Core's Full Convert Enterprise.

I've used it successfully in the past, too.

Update:

Since you clarified that you need a programmatic solution, I do recommend you do it manually:

  1. Open a connection to the MDB file through ADO.NET.
  2. Iterate all tables.
  3. Create a text file (CSV) for each table.
  4. For each table, iterate all rows.
  5. For each row, write a new line in the text file.
  6. For each row, iterate all columns.
  7. For each column, write the value to the text file in the current row.
like image 44
Uwe Keim Avatar answered Sep 18 '22 14:09

Uwe Keim