Import CSV contacts into Android 4 phone
Asked Answered
S

6

5

I have a CSV-file with all my contacts (exported from Thunderbird).

On my Phone I have Android 4 ice cream sandwich installed.

How can I import the contacts from the CSV-File into my Android cellphone (sony ericson Xperia Ray) without using any "spyware" (google, facebook, outlook, etc.)?

Sastruga answered 2/7, 2012 at 19:51 Comment(1)
I think this is important, so google doesent get all your address info. For reasons of protection of privacy.Sastruga
R
5

Here's the Windows-only version of rubo77's solution:

  1. Import the csv-list into the Windows 7 Contacts. (remember you can only use the Windows contacts fields once per csv field)

  2. Export the Windows Contacts into single VCF-Cards.

  3. Glue them all together into one large vcf file:

    type *.vcf>..\all_adresses.vcf

  4. Convert all_adresses.vcf to UTF-8 so the special characters are correct:

    Open all_adresses.vcf in Notepad++, click Encoding > Encode in UTF-8. Save.

  5. Import them into android Phone (in Contacts there is an option to import from SD-Card)

Radford answered 2/2, 2013 at 16:53 Comment(0)
S
5

I tried a lot and finnally i found a solution that works without google!

  1. I imported my csv-list into the Windows 7 Contacts. (it's easy if you adjust the first line with the correct fieldnames)

  2. then I exported them from there into single VCF-Cards.

  3. I glued them all together into one large vcf file:

    cat *.vcf>../all_adresses.vcf

  4. convert them to UTF-8 so the special characters are correct:

    iconv --from-code=ISO-8859-1 --to-code=UTF-8 all_adresses.vcf > all_adresses_correct.vcf

  5. finally I imported them in my android Phone (in Contacts there is an option to import from SD-Card)

if you delete them from your windows contacts after you are done, I think no traces of your addresses are left on the computer.

Sastruga answered 3/7, 2012 at 11:42 Comment(0)
R
5

Here's the Windows-only version of rubo77's solution:

  1. Import the csv-list into the Windows 7 Contacts. (remember you can only use the Windows contacts fields once per csv field)

  2. Export the Windows Contacts into single VCF-Cards.

  3. Glue them all together into one large vcf file:

    type *.vcf>..\all_adresses.vcf

  4. Convert all_adresses.vcf to UTF-8 so the special characters are correct:

    Open all_adresses.vcf in Notepad++, click Encoding > Encode in UTF-8. Save.

  5. Import them into android Phone (in Contacts there is an option to import from SD-Card)

Radford answered 2/2, 2013 at 16:53 Comment(0)
W
4

This is a dirty fix but it worked for me (on Linux although cygwin could be used on Windows env) :

  1. Export your contact in Thunderbird as CSV using commas.
  2. File format is like this :

First Name,Last Name,Display Name,Nickname,Primary Email,Secondary Email,Screen Name,Work Phone,Home Phone,Fax Number,Pager Number,Mobile Number,Home Address,Home Address 2,Home City,Home County,Home Post Code,Home Country,Work Address,Work Address 2,Work City,Work County,Work Post Code,Work Country,Job Title,Department,Organisation,Web Page 1,Web Page 2,Birth Year,Birth Month,Birth Day,Custom 1,Custom 2,Custom 3,Custom 4,Notes,

In my case most the entries contain only First Name,Last Name,Display Name,,Primary Email.

So I used sed to convert each entry to VCF 2.1 format :

BEGIN:VCARD
VERSION:2.1
N:LastName;FirstName
FN:FirstName LastName
EMAIL;PREF;INTERNET:local@domain
END:VCARD

Here is the script ( honestly it is just a one line command but for more clarity.. ) :

#!/bin/bash

# This script convert a ThunderBird AddressBook ( 17.04) exported as CSV file using commas into a VCF 2.1 file.
# rmistero - April 2013 - GNU GPL 3


CSV_FILE="contacts.csv"
VCF_FILE="contacts.vcf"

# sed is looking for regex pattern NOT containing commas between 2 commas.

sed -e "s/^\([^,]*\|\".*\"\),\([^,]*\),\([^,]*\),[^,]*,\([^,\"\']*\),.*$/N:\2;\1\nFN:\3\nEMAIL;PREF;INTERNET:\4\n/g" -e "1d" < $CSV_FILE |  sed -e "/^EMAIL/ a\END:VCARD" -e "/^N/ i\BEGIN:VCARD\nVERSION:2.1" | grep -vE "^$|\"" > $VCF_FILE

Once the file has been converted, just put the file on the USB drive of your Android phone. Then go to Contact, Settings, and Import/Export a single vCard file.

If everything goes well you should see the number of contact entries detected by the phone and the number loaded to the phone.

NOTE: to count the number of entries in contacts.csv, just do :

grep -c EMAIL contacts.csv

This will return the number of lines matching "EMAIL" ( hence number of contacts).

Waterlogged answered 28/4, 2013 at 18:36 Comment(1)
Hi, I've tried your solution. Thunderbird Export works well. Your Bash-Script also works well. Putting VCF-File to Android device OK, but Import does not work. I got the Error Message that contacts could not be imported.Doolittle
M
1

An easy way to export all contacts in outlook as vcf is to select them all and choose email as attachments. Once the draft emails opens up with attachments, select all attachments, right click and copy. Got to a folder, right click and paste.

Moffett answered 21/12, 2013 at 17:42 Comment(1)
You should add how to import the CSV file into outlook otherwise this is not a complete answerSastruga
E
1

Okay so I'm on Android 7.0 but here's how I had to do it from my phone... I was importing from my old phone, a Windows Phone 8, and I think it could only export my contacts to CSV...

(Fortunately that's a universal file extension (Comma Separated Values), and I was also able to remove some junk manually with regex - anyways...)


Using either Firefox Beta or Google Chrome, I went to http://google.com/contacts, logged into the GMail account I wanted use for my phone's contacts, in Firefox Beta I had to tell it to use the old version of Contacts I think (the new version didn't have an import feature), and then the page looked like the standard web GMail layout kind of. On the left side was a link that said "Import Contacts...", so I clicked that, and then it let me choose a file from my phone ("Documents"); note that this part did not work in Firefox Focus.

At the top right I selected "Show internal storage", and then at the top left I opened up File Manager, selected my CSV file, and imported it into GMail Contacts. Then, it immediately synced all of the contacts over to my Android phone.

Extraordinary answered 7/3, 2018 at 20:11 Comment(0)
B
0

MobiKin Assistant for Android can help you import or export contacts from android phone to excel format as CSV or XLS very easily. It is the popular tool of Android data backup and transfer. You can search "MobiKin Assistant for Android" by Google. Hope this helps!

Bobker answered 15/9, 2015 at 3:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.