vCard stands for Virtual Business Card, and like a traditional Business Card it is used for electronic exchange of personal information ranging from the usual name, phone number and email address to less popular categories such as Addresses, Faxes and Websites.
The majority of us however just use it to store contacts, usually a backup so that you can import it in a new phone, an email client like Outlook or an internet service like Google Contacts.
Despite being the standard for this procedure, once in a while you’ll encounter a program or internet service that insists on using another format to import or export contact information.
The usual suspect here tends to be the CSV (Comma Separated Values), which is a simple database format like an Excel Spreadsheet.
As such, you’ve no choice but to convert the existing VCF into a CSV file. In my case I had to do this for a particular dongle software and after some searching I discovered that I could do this offline using Microsoft Excel or online using Google Contacts.
Step 1: Merging Multiple VCFs
If you’ve multiple VCFs rather than one containing multiple vCrads you can concatenate them together into a singleVCF file. Otherwise, you’ll be forced to covert each VCF separately.
To concatenate in Windows, do the following:
- Place all the VCFs in one folder.
- Launch the command prompt by searching CMD in the Start Menu or launch the run window (Win+R) and type CMD then OK.
- In CMD navigate to the folder where the VCFs are located. For example, if they’re inside the folder C:\contacts run:
- Next, type the following command and press enter:
copy *.vcf contacts.vcf. A single VCF file called contacts.vcf will be saved in the same folder.
Step 2: Convert VCF to CSV using an Excel Macro
- Get this Excel VBA Script by Greg Hadlock from SourceForge. The script is actually a Macro Enabled Microsoft Excel Workbook (*.xlsm) that will allow you to import a VCF (version 2.0, 2.1, 3.0 and 4.0) containing multiple vCards (contacts).
- The workbook format should be already associated with Microsoft Excel, in which case just double-click to open it. If it’s not associated, launch Excel first, then use the Open dialog to open the file.
- When you open the file, you’ll get a security warning that Macros have been disabled. In Excel 2010 and later, click on the Enable Content button to allow this script to run.
- In Excel 2007, click the Options button first, then select Enable this content in the pop-up window.
- Enabling the Macro will launch an Open dialog prompting you to open a VCF file. So navigate to where you have saved your VCF file, select it and click the Open button.
- Doing that will automatically load and convert the VCF to a CSV file opened in Excel. You’ll then get a pop-up window detailing the number of vCards that have been imported and how long it took, usually just seconds.
- However, if the script detects your VCF has empty fields (e.g. Fax, Spouse etc.) it will first prompt you on whether it should delete the associated empty columns in Excel.
I think the safe choice here is to leave the empty columns as they’re but if you are sure you just need the filled fields go ahead and delete the empty ones.
- The converted CSV can now be found inside the folder where the VCF is located, so no need to save it unless you make any changes within Excel. Should you want, you can also save it another Excel format like an Excel Workbook (*.xlsx).
Corrupted Macro Issue
I took the time to test this script on different Excel versions and noticed that on Excel 2010 (Windows) I got a prompt after Enabling Content that the macros in the workbook are corrupted and have been deleted.
I couldn’t get the macro to work in this version. This is however a problem with either my Excel setup or the 2010 version and not the macro as I can confirm that it runs without any issues on the Windows versions of Excel 2007, 2013, 2016 and 2019.
Thank you very much, it saved me a lot of time trying to make this grid in a format I can use.
You’re most welcome, Mark.
The sourceforge file is gone.
The Excel VBA script is still available in the linked Sourceforge page. Please check again.