How to add multiple calender dates from excel to Apple ical. 1. Create new calender in ical & name it. 2. Open your excel sheet with the calender dates in three columns Start Date, Time, Location. 3. Open Script editor > applications/Applescript/Scripteditor. 4 . Copy & Paste this code tell application "Microsoft Excel" set theWkbk to active workbook set theWS to active sheet of theWkbk set theRows to rows of (get used range of theWS) set the item_count to the number of items in theRows
set propslist to {} repeat with i from 1 to the item_count set this_item to item i of theRows set v to value of this_item if i is 1 then set AppleScript's text item delimiters to return display dialog ("Data to be imported: Start Date, Time, Location,. Your Data: " & return & v) buttons {"Cancel", "OK"} default button 2 set AppleScript's text item delimiters to "" else set v to value of row i of (get used range of theWS) set theStartDate to item 1 of item 1 of v set theStartTime to item 2 of item 1 of v set theStartDateTime to theStartDate + theStartTime * 24 * hours set theEndDate to theStartDateTime + 90 * minutes set theLocation to text item 3 of item 1 of v set theSummary to "Leeds v " & theLocation set theDescription to "On & On" set theEventProps to {theStartDateTime, theEndDate, theLocation, theSummary, theDescription} set the end of propslist to theEventProps end if end repeat end tell tell application "iCal" activate set calendarNames to title of every calendar choose from list calendarNames set theSelection to result if theSelection = false then return end if set myChoice to theSelection as string tell calendar myChoice repeat with theProps in propslist set theEvent to make new event at end of events with properties {start date:item 1 of theProps, end date:item 2 of theProps, location:item 3 of theProps, summary:item 4 of theProps, description:item 5 of theProps} end repeat end tell end tell 5.Run the code ensuring that your excel sheet is active & then choose the calender you have created !! --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---