Hello!
This was just what i did needed too! But can anyone help to update that script so that i can add there allso "ALL DAY" event? There was some scripts about it where "ALL DAY" event where marked in exel colum TRUE / FALSE.
Here is thet script with TITLE, START and END colums...
on open DroppedFile
tell application "Microsoft Excel"
open DroppedFile
set UsedCells to value of used range of sheet 1
quit --remove this if Excel sholud stay open
end tell
set SummaryCol to FindInList("Title", item 1 of UsedCells)
set StartCol to FindInList("Start", item 1 of UsedCells)
set EndCol to FindInList("End", item 1 of UsedCells)
tell application "Calendar"
set CalList to title of every calendar
end tell
set Chosen to choose from list CalList with prompt "Choose calender for the new events"
if Chosen is not false then
set TheCalendar to FindInList(Chosen, CalList)
if (SummaryCol > 0) and (StartCol > 0) and (EndCol > 0) then --REQUIRE Title, Start and End
set DescripCol to FindInList("Description", item 1 of UsedCells) --look for additional items
set LocCol to FindInList("Location", item 1 of UsedCells)
if (count of item 1 of UsedCells) > 1 then --there are some data rows
set UsedCells to rest of UsedCells
repeat with AnEvent in UsedCells
set theSummary to (item SummaryCol of AnEvent)
set TheStart to (item StartCol of AnEvent)
set TheEnd to (item EndCol of AnEvent)
tell application "Calendar"
tell calendar TheCalendar
set CalEvent to make new event at end of events with properties {summary:theSummary, start date:TheStart, end date:TheEnd}
if LocCol > 0 then set location of CalEvent to item LocCol of AnEvent
if DescripCol > 0 then set description of CalEvent to item DescripCol of AnEvent
end tell --calendar
end tell --iCal
end repeat --AnEvent
end if --are datarows
else
display dialog "Spreadsheet must have Title, Start, and End columns" with icon stop
end if --missing headers
end if --no calendar selected
end open
on FindInList(Needle, HayStack)
set FoundAt to 0
if Needle is in HayStack then
repeat with FoundAt from 1 to count of HayStack
if Needle is item FoundAt of HayStack then exit repeat
end repeat
end if
return FoundAt
end FindInList