Convert Excel contact spreadsheets to Google Contacts CSV format.
pip install -r requirements.txtOptional (editable install with dev tools):
pip install -e '.[dev]'# Default: reads ./examples/excel.xlsx, writes ./examples/google_contacts.csv
python main.py
# Custom paths and country
python main.py -i contacts.xlsx -o output.csv -c USThe default input ./examples/excel.xlsx is not shipped with the repository
(data files are gitignored) — create it or pass -i <path>.
from jupiter_to_contacts import convert_excel_to_google_csv
convert_excel_to_google_csv("input.xlsx", "output.csv", default_country="IT")from jupiter_to_contacts.phone import format_phone_number, get_country_code
# Format a phone number
formatted = format_phone_number("+39 333 1234567", "Italy", "IT")
# Get country code from country name
code = get_country_code("Italy") # Returns "IT"To track numbers that could not be parsed, use PhoneNumberHandler directly:
from jupiter_to_contacts.phone import PhoneNumberHandler
handler = PhoneNumberHandler()
formatted = handler.format_phone_number("12345", "Italy") # '' when unparseable
handler.get_failed_numbers() # {('12345', 'Italy', 'IT')}The Excel file should contain columns for:
- First Name
- Last Name
- Phone (optional)
- WhatsApp (optional)
- Country (optional, defaults to IT)
- Birthdate (optional, DD/MM/YYYY)
Sheets with the required columns become contact groups in Google Contacts; sheets missing First Name, Last Name or Email are skipped.
The output is a CSV file compatible with Google Contacts import.
- Python 3.8+
- pandas
- phonenumbers
- openpyxl