Exporting SharePoint Calendar details in iCalendar format

This content is 13 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

One of my current activities involves sharing the contents of a SharePoint calendar, which is hosted on an Intranet site, with external contacts.  An extranet portal would be one possible approach but it’s probably over-engineering the solution and a simple calendar export, updated on a regular basis would also suit the requirement.

SharePoint allows RSS export from a Calendar but the events are exported in the order in which they were added to the calendar, rather than in chronolical order.  I thought it would be far more useful to export them in iCalendar format and it turns out that’s possible too – with the addition of  an open source webpart called iCal Exporter (which my colleague Andrew Richardson tracked down).  You can also interrogate the SharePoint object model directly but that’s beyond my limited coding abilities.

Installing the webpart is pretty straightforward:

  1. Unzip the compiled version of the iCal Exporter webpart and copy the iCalExporter.wsp file to the hard drive on a SharePoint server (I used Windows SharePoint Services 3.0).
  2. From the command prompt, issue the following commands to navigate to the folder containing stsadm.exe, install the solution and deploy the solution:
    cd “%commonprogramfiles%\Microsoft Shared\Web Server Extensions\12\bin”
    stsadm –o addsolution –filename “c:\iCalExporter.wsp”
    stsadm –o deploysolution –name iCalExporter.wsp –local
    (it may be necessary to specify other options if deploying in a multi-server environments.)
  3. Using a web browser, navigate to the server’s site collection features page and click the Activate button on the iCalendar export button feature.

Once installed, there is an additional option on the Actions menu export the calendar in iCalendar format.  Give the resulting file an .ics extension and distribute it at will – most calendar clients (I tested in Outlook but it should work for others too) will be able to view the appointment details.

7 thoughts on “Exporting SharePoint Calendar details in iCalendar format

  1. Do you know of anything like this that could be used to export individual calendar items at .ics files? I’ve been searching around and not finding much on that…

  2. If you experience problems with this go to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS
    locate and edit ical.aspx.

    Add this after Response.ContentType = “text/calendar”; line:

    Response.AppendHeader(“Filename”, “event.ics”);
    Response.AppendHeader(“Content-Disposition”, “attachment;filename=event.ics”);

    this would allow IE to recognize this file in case if you don’t have outlook installed on your client machine otherwise it will produce an xml type error

  3. Every time I use this, I just get a generic Sharepoint error page:
    Unknown Error
    Troubleshoot issues with Windows SharePoint Services.


  4. For future reference, the last post about the “Unknown error” is fixed by adding the two lines to ical.aspx mentioned in the post before that.

    That problem can occur even if you do have Outlook installed, as I saw it happen with some cals but not others, seemingly randomly, from the same PC. When you do copy and paste the lines, be sure to correct the quotation marks, which are the fancy, curly variety rather than the “straight” ones. I doubt the fancy ones would work.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.