VCF to CSV Converter

New version of the converter is ready for testing. It adds support of a large number of fields and conforms to the VCARD 3.0 standard.

You can find it here: http://code.google.com/p/vcf-to-csv-converter/

I will leave this old version here for now, if anyone still needs it.

Param Description
h or –help displays the usage menu
-i filename input file (required parameter)
-o filename output file (require parameter)
-d [comma|tab|semicolon] delimiter to use in the output, tab is default
-q double quote the output values

python ./convertContacts.py -i vcfFile.vcf -o ~/csvFile.csv -d comma -q

  convertContacts.py (5.3 KiB, 988 hits)

Latest updates: http://code.google.com/p/vcf-to-csv-converter/

Comments (12)

HessyApril 9th, 2009 at 8:11 pm

awesomo!

hakan yamanMay 1st, 2009 at 1:47 am

Dear Peter,
I will need your help and advice. I’ve been using Sonyericsson phones for long years. I always transferred my vcf phone book directly to my new phones. But now I have a Nokia phone and I cant convert all my phone book to csv. The problem is that in my address book one person some times has 3-4 mobile numbers. When I convert this vcf it only converts some of my numbers not all. What do you think I should do? If you can write to me your advice I would be very happy. Thanks a lot.

adminMay 3rd, 2009 at 10:47 am

Hello Hakan,

Google Contacts allows you to merge multiple contacts into one. You could in theory export to CSV, import the CSV into Google Contacts/GMail and merge the multiples that way.
Your other option is to send me a sample of the input file and perhaps I can find a way to merge multiple similar records into one in some way.

Let me know how it all works out for you.

ChiragJune 21st, 2009 at 7:36 pm

Hi there…can you please help me? I’m not able to convert vCards from Address Book to transfer to a Nokia 8910i phone.. I’ve tried other CSV converters but once I send the file to my phone, it says “not supported by the phone”. Are there different versions of CSV files?
I couldn’t figure out how am I suppose to use the above thing. When I download it, Terminal opens up showing “missing required parameters”
Thank you…

adminJune 23rd, 2009 at 6:00 am

Unfortunately I’m not familiar with the details of the import file required by the 8910i. There’s a possibility they require a different delimiter or something. To use my converter you would type in a command like this:

python ./convertContacts.py -i {input file name} -i {output file name}

Can you tell me how you are executing it?

joni MuellerJune 29th, 2009 at 2:59 pm

Great; saved my bacon when I had over 100 VCF v-cards my boss wanted dumped into excel!! Notice your surname. Srbin? Pozdrav!

Joni

vvJuly 14th, 2009 at 9:59 am

thanks

dragon61August 4th, 2009 at 7:15 am

Hi how to type command python ./convertContacts.py -i {input file name} -i {output file name} ?

the file where i put eg c:\

AlanSeptember 10th, 2009 at 11:59 pm

I couldn’t figure out–it doesn’t do Address/City/State/Zip/Country, or I did something wrong?

billSeptember 20th, 2009 at 3:00 am

tried it with nokia contacts vcf file – no good.

adminSeptember 23rd, 2009 at 2:07 pm

Bill and Alan, if you can send me a file I will try to make it work. Use the contact form please.

MarioSeptember 26th, 2009 at 3:05 am

Hello,

I’m trying to convert contacts from the Motorola RAZR V6 to the LG KP202. This is what happens :

root@marietto2009:/home/marietto/Scrivania/LG# python ./convertContacts.py -i Contacts.vcf -o contacts.csv -d -q
converting Contacts.vcf > contacts.csv (tab delimited)
Traceback (most recent call last):
File “./convertContacts.py”, line 188, in
main()
File “./convertContacts.py”, line 184, in main
VCFToCSVConverter( input_file, output_file, delimiter, quote )
File “./convertContacts.py”, line 139, in __init__
self.__parseFile()
File “./convertContacts.py”, line 45, in __parseFile
self.__parseLine( theLine )
File “./convertContacts.py”, line 63, in __parseLine
self.__processLine( theLine.split(”:”) )
File “./convertContacts.py”, line 71, in __processLine
self.__process_phone( pieces[0].split(”;”)[1], pieces[1] )
IndexError: list index out of range

Leave a comment

Your comment