Skip to content

A simple tool to convert Excel to VCard. By this tool, you can convert Excel to VCard, and then import all contacts to your phone. So it's easy to import contacts to your phone.

License

Notifications You must be signed in to change notification settings

BaseMax/Excel2VCard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Excel2Vcard

A simple tool to convert Excel to VCard.

By this tool, you can convert Excel to VCard, and then import all contacts to your phone. So it's easy to import contacts to your phone.

Options

INPUT = 'input.txt'
OUTPUT = 'output.vcard'
DEFAULT_INTERNATIONAL_CODE = '+962'

You can easily change the input file name, output file name, and the default international code.

The default international code is +962, which is the international code of Jordan. It mean the converter will change all numbers to the international format. For example if you have a number 0791234567, the converter will change it to +962791234567.

Usage

  1. Install Python and Pip.
  2. Clone this repository.
  3. Put your Excel file in the same directory as the script.
  4. Copy-paste your excel data into a plain text file, and save it as input.txt.
  5. Run python excel2vcard.py.
  6. The output file will be output.vcf.
  7. Import the output file into your phone.
  8. Enjoy!

TODO

The best practice is to use Pandas to read the Excel file, but I didn't want to add another dependency to the project. So I read the data from a plain text file. If you want to use Pandas, you can use the following code:

import pandas as pd

df = pd.read_excel('input.xlsx')
df.to_csv('input.txt', index=False, header=False)

It's better to add a column-base row at the top of the Excel file, and use the column names as the keys in the VCard file. But I didn't it.

Read more about VCard: https://www.rfc-editor.org/rfc/rfc6350

© Copyright 2022, Max Base

About

A simple tool to convert Excel to VCard. By this tool, you can convert Excel to VCard, and then import all contacts to your phone. So it's easy to import contacts to your phone.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages