How to open or export a abcddb file in Windows 7 Excel

file conversion

I have a file in the abcddb format. This file was saved on a Mac. I am trying to open in Windows 7 in either Excel or Access. How can I do this?

Best Answer

The file is actually an SQLite 3 datafile.

The closest match would be Access, but it will not open the file as such. You will have to install an ODBC connector, set up a connection and open each table. Not trivial, I am afraid, but doable.

Check http://www.ch-werner.de/sqliteodbc/ for an SQLite ODBC connector. Note: some antivirus show a heuristics alert for the executable, it is probably safe.

Command line: If you have access to the sqlite3 command line tool (comes standard in OS X), you can list the tables (there are 24) with

echo .tables | sqlite3 file.abcddb

and you can export each table to CSV with

sqlite3 -csv -header file.abcddb "SELECT * FROM TABLE;" > TABLE.csv

and open it with Excel or Access.

Of course, you can "play" with SQL SELECTs. A CSV list of Name, Surname, Phone (with a line for each phone number, hence possibly more than a line for each person) can be got with:

sqlite3 -csv -header file.abcddb "SELECT ZABCDRECORD.ZFIRSTNAME AS 'First Name', ZABCDRECORD.ZLASTNAME AS 'Last Name', ZABCDPHONENUMBER.ZFULLNUMBER AS 'Phone' FROM ZABCDRECORD INNER JOIN ZABCDPHONENUMBER ON ZABCDPHONENUMBER.ZOWNER = ZABCDRECORD.Z_PK;" > telephones.csv

ZABCDRECORD is the "main" table with a row for each contact. But data that cn be multiple for each contact (phone numbers as above, email addresses, physical address, URLs...) is in separate tables, each containing a ZOWNER column that "points" to column Z_PK (autonumeric) in ZABCDRECORD (technically, they have it as a foreign key).

Alternative GUI software: you may download DB Browser for SQLite for OS X or Windows (PortableApps package available too for the later). Just open the file then use File->Export->Table(s) as CSV file.