Macworld Forums

Macworld Forums: Automator workflow of the month: Export contacts to Excel - Macworld Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Automator workflow of the month: Export contacts to Excel

#1 User is offline   Macworld 

  • Story Poster
  • Group: MW Bot
  • Posts: 31,686
  • Joined: 30-November 07

Posted 02 July 2012 - 05:01 AM

Post your comments for Automator workflow of the month: Export contacts to Excel here
0

#2 User is offline   rcgregory 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 11
  • Joined: 13-February 06

  Posted 02 July 2012 - 07:51 AM

Love this workflow, but is there a way to export ALL address book contacts to Excel. I can't seem to find a wildcard option that makes the export happen with this flow....

THANKS
0

#3 User is offline   Chris Breen 

  • Advanced Member
  • Group: Moderators
  • Posts: 5,925
  • Joined: 11-December 00

Posted 02 July 2012 - 08:15 AM

View Postrcgregory, on 02 July 2012 - 07:51 AM, said:

Love this workflow, but is there a way to export ALL address book contacts to Excel. I can't seem to find a wildcard option that makes the export happen with this flow....


You could cheat by using an IS NOT condition in the first action. So. ZIP Code Is Not ABCDE. The action should then see that all of your contacts can be acted on, because none of them have ABCDE in the ZIP Code field.

#4 User is offline   stuzog 

  • Newbie
  • Pip
  • Group: New Members
  • Posts: 1
  • Joined: 02-July 12

  Posted 02 July 2012 - 09:45 AM

For this workflow to work, Excel has to be already running. Is there any way of getting it to work with Numbers?
0

#5 User is offline   Chris Breen 

  • Advanced Member
  • Group: Moderators
  • Posts: 5,925
  • Joined: 11-December 00

Posted 02 July 2012 - 09:49 AM

View Poststuzog, on 02 July 2012 - 09:45 AM, said:

For this workflow to work, Excel has to be already running.


That's incorrect. Excel will launch it it's not already running. For this to work with Numbers you'd need an AppleScript or action written specifically for Numbers.

#6 User is offline   Slartibartfast 

  • Member
  • PipPip
  • Group: Members
  • Posts: 50
  • Joined: 29-January 08

Posted 02 July 2012 - 02:35 PM

View Poststuzog, on 02 July 2012 - 09:45 AM, said:

For this workflow to work, Excel has to be already running. Is there any way of getting it to work with Numbers?


Numbers isn't technically AppleScript-able but it can be somewhat scripted via "system event" keystrokes. This is automating via keyboard actions like you were issuing the commands yourself. This is a quick and dirty Applescript with no error trapping but it'll work. You'll want to clean up the results in Numbers afterwards.

Select all of the script below and paste into a "Run Applescript" automator action. This one automator action will replace the last two automator actions in Chris's workflow.

on run {input, parameters}
tell application "System Events"
set UI elements enabled to true
end tell

tell application "Numbers"
activate

tell application "System Events" to keystroke "n" using command down -- create new file
delay 1
tell application "System Events" to keystroke return -- select default template
delay 1
tell application "System Events" to key code 123 -- move to the left one cell
delay 1
tell application "System Events" to keystroke "v" using command down -- paste contents of the clipboard.


end tell
return input
end run
0

#7 User is offline   prmorel 

  • Newbie
  • Pip
  • Group: New Members
  • Posts: 2
  • Joined: 03-July 12

  Posted 03 July 2012 - 04:58 PM

The "Get Contact Information" module only works properly when I execute the workflow from within automator.

Problem: This action module has checkboxes. I would like to get the "Company" field and I would like to not get the "Instant Messaging" field. If I execute the module from automator, I get exactly what is checked. However, if I launch the workflow as a service from any application (I tried with Excel and Finder) I do not get the "company" field and I get the "instant Messaging" field even though I unchecked it.

Of course, the simple solution is to always run the workflow from within automator, but does it not defeat the purpose of a "service"?

Please note that I use a French version of OS X and a US English version of Excel. However, this should not be causing a problem, because the workflow works fine when I execute it from within automator.
0

#8 User is offline   bjmac 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 08-September 07

  Posted 08 July 2012 - 04:16 AM

How would I go about importing the edited results from Excel back into Address Book? I have accumulated over 800 contacts over the years, and would like to cull these in Excel, and replace all my Address Book entries with the edited in Excel results.
0

#9 User is offline   ZoeKaczorowski 

  • Newbie
  • Pip
  • Group: New Members
  • Posts: 1
  • Joined: 16-July 12

Posted 16 July 2012 - 04:43 AM

View Postbjmac, on 08 July 2012 - 04:16 AM, said:

How would I go about importing the edited results from Excel back into Address Book? I have accumulated over 800 contacts over the years, and would like to cull these in Excel, and replace all my Address Book entries with the edited in Excel results.

Just import it into Address book - it doesn't have any problems importing a csv, only exporting one...
0

#10 User is offline   streettwanderer 

  • Newbie
  • Pip
  • Group: New Members
  • Posts: 2
  • Joined: 30-November 12

  Posted 30 November 2012 - 07:24 AM

Quote

Love this workflow, but is there a way to export ALL address book contacts to Excel. I can't seem to find a wildcard option that makes the export happen with this flow.... THANKS


Use the @ symbol - it will export any info that contains it, and if email is one of the fields you are exporting, that will capture everything.
0

#11 User is offline   streettwanderer 

  • Newbie
  • Pip
  • Group: New Members
  • Posts: 2
  • Joined: 30-November 12

  Posted 30 November 2012 - 07:25 AM

Update for Mountain Lion users - Automator no longer has Find Address Book Items as an option under Contacts - it has been renamed Find Contact Items
0

#12 User is offline   wheat123 

  • Newbie
  • Pip
  • Group: New Members
  • Posts: 1
  • Joined: 09-February 13

  Posted 09 February 2013 - 05:34 PM

I do not see a "documents library" on my Automator, nor any other way to navigate to excel. Running Mac OS 10.7.5
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users