Code Monkey home page Code Monkey logo

basemax / excel2vcard Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 22 KB

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: GNU General Public License v3.0

Python 100.00%
contacts excel excel-import excel-reader excelreader py py3 python python3 vcard vcard-converter vcard-parser excel2vcard vcard-convert vcard-convertor vcard-creator

excel2vcard's Introduction

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

excel2vcard's People

Contributors

basemax avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.