Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Export contacts to .csv in 10.13

Looking to export contacts to a .csv


Saw a couple replies that were just links to a google search. Please don't be that guy. This is something that should be easily done on a mac without using a 3rd-party software.

MacBook Pro with Retina display, macOS High Sierra (10.13.4)

Posted on May 7, 2018 1:11 PM

Reply
8 replies

May 7, 2018 2:30 PM in response to eldougfromhouston

You can try this AppleScript, limited to names and email address only—but painless—compile and run :


-- Save comma separated values (CSV) file to desktop
set exportPath to (path to desktop as string) & "contacts.csv"
set contactsCSV to "" -- variable to collect rows of addresses
set quoteString to "\"" -- constant to ease concatenation
tell application "Contacts"
-- Repeat with every person in your Contacts
repeat with x from 1 to the count of people
set thePerson to person x
set theirName to the name of thePerson
-- A person may have multiple e-mails addresses, add one row for each
repeat with anEmail in the email of thePerson
set contactsCSV to contactsCSV & quoteString & theirName & quoteString & "," & quoteString & (value of anEmail) & quoteString & "
"
end repeat
end repeat
end tell
-- Write the CSV contents to a file
set exportFile to open for access file exportPath with write permission
set eof of exportFile to 0
write contactsCSV to exportFile starting at eof
close access exportFile




ref:mac - How to export address book to mailchimp or CSV file? - Ask Different

Question marked as Helpful

May 7, 2018 4:09 PM in response to eldougfromhouston

Depending on what fields you need to export,


Open Automator and create a new workflow.

From the Contacts Library,

Drag in a Get Selected Contacts Items (set it to People)

Drag in a Get Contact Information {set it to Spreadsheet (tabs) }

Select the items you want to export. If that isn't all you need, then this isn't suitable.

From the Text Library,

Drag in a New TextEdit Document


Open Contacts, Select all the contacts you wish to export, then run the workflow in Automator.

It will open a new text document with the fields separated by tabs.

Use find/replace to change the tabs into commas.


You may want to search for commas before you replace the tabs, and enclose the entire field that contains a comma with "".

User uploaded file

Export contacts to .csv in 10.13

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.