Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9186325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:29:55+00:00 2026-06-17T19:29:55+00:00

I get my teaching schedule and term plans in word doc table. I would

  • 0

I get my teaching schedule and term plans in word doc table. I would like to know if there is a way to get this data into iCal. It will take me much longer to create events in iCal than what it would to copy these tables into an excel file and import to iCal from there.

The data would be one day events ie House-Gala Friday 22/02/2013 and the rest of the data will be 2 weeks or 3 weeks events ie 3 Weeks – Gr.10 Maths – Topic:Exponents (these events will be a 5 day event (Monday to Friday) repeated for three weeks.)

This is a script I got from the internet – but the first error it gives is me is that it can’t convert the .csv file text into type Unicode.

Another issue later in the script will be to get those 5 day events to repeat for 3 or 2 weeks.

Any help would be greatly appreciated. This is what I have thus far:

  --Convert CSV file to iCal events
  --Prompts for file, then processes
  --expects date,start time,end time,event name,xxxx,calendar name
  --eg 12/01/2006,20:30,22:00,Water Committee,,TestCal
  --change the various text item ns if data order in a file line is different
  --blank lines skipped
  --if other data present (eg location, notes ...) add a line in the tell calendar Calno loop
--to include it eg set location to text item 5 of ThisLine
set OldDelimiters to AppleScript's text item delimiters
set LF to ASCII character 10
set theFile to choose file with prompt "Select CSV calendar file"
set theLines to read theFile
set AppleScript's text item delimiters to {LF}
set theLines to paragraphs of theLines
set AppleScript's text item delimiters to {","}
repeat with ThisLine in theLines
    if (count of ThisLine) > 0 then --ignore blanks
        set StartDate to date (text item 1 of ThisLine & " " & text item 2 of ThisLine)
        set EndDate to date (text item 1 of ThisLine & " " & text item 3 of ThisLine)
        set CalName to word 1 of text item 6 of ThisLine
        tell application "Calendar"
            set CalList to title of every calendar
            if CalName is in CalList then
                repeat with CalNo from 1 to count of CalList
                    if CalName is item CalNo of CalList then exit repeat
                end repeat
            else
                set NewOne to make new calendar at end of calendars with properties {title:CalName}
                set CalNo to 1 + (count of CalList)
            end if
            tell calendar CalNo
                set newItem to make new event at end of events with properties {start date:StartDate}
                set summary of newItem to text item 4 of ThisLine
                set end date of newItem to EndDate
            end tell --calendar
        end tell --iCal
    end if
end repeat
set AppleScript's text item delimiters to OldDelimiters

Ok thanks for the replies, this is what I have thus far, I can’t get the recurrence to use NumberCount as the COUNT for the repeat of the event:

set text item delimiters to ";"
repeat with l in paragraphs of (read "/Users/pienaar0/Desktop/test.csv" as «class utf8»)
if contents of l is not "" then
    set sd to date (text item 1 of l & " ")
    set ed to date (text item 2 of l & " ")
    set NumberWeeks to (text item 4 of l & " ")
    set NumberCount to NumberWeeks - 1
    tell application "Calendar" to tell calendar "Test"
        make new event with properties {allday event:true, start date:sd, end date:ed, summary:text item 3 of l, recurrence:"FREQ=WEEKLY;COUNT=2 * NumberCount"}

    end tell
end if
 end repeat
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:29:56+00:00Added an answer on June 17, 2026 at 7:29 pm
    set text item delimiters to ","
    repeat with l in paragraphs of (read "/Users/username/Desktop/test.csv" as «class utf8»)
        if contents of l is not "" then
            set sd to date (text item 1 of l & " " & text item 2 of l)
            set ed to date (text item 1 of l & " " & text item 2 of l)
            tell application "Calendar" to tell calendar "Test"
                make new event with properties {start date:sd, end date:ed, summary:text item 4 of l}
            end tell
        end if
    end repeat
    

    test.csv:

    01/25/2013,10:30PM,11:00PM,test event
    01/26/2013,00:00AM,01:00AM,test event2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm self-teaching c++ and i get how pointers work. but the doc i'm using
I am teaching my friend how to make websites. I would like to keep
I am teaching myself C# (I don't know much yet). In this simple example:
Are there good references teaching you how to send PUT/DELETE/POST/GET with ruby? I have
I get this error while accessing a php script: W/System.err: Error reading from ./org/apache/harmony/awt/www/content/text/html.class
I am teaching myself to write classes in C++ but can't seem to get
I have started teaching myself about the Android NDK and I have followed this
I want to know the POST method instead of the GET method. Sent value
It's me again and I just can't seem to get this code to work.
I am teaching myself asp .net mvc 3. I read this tutorial: http://www.codeproject.com/Articles/148949/ASP-NET-MVC-3-the-Razor-View-Engine-and-Google-Map and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.