Does SharePoint 2010 support the iCalendar format?

2019-03-26 04:09发布

问题:

Sounds like a very silly question, but I tried, and it isn't too easy to find a simple answer to this simple question on google.


The longer story:

Before I started my search, I just took it for granted that SharePoint provides a web service to access a calendar using iCal.

But after having searched I fear I was totally wrong. I just don't want to believe it. Not even in SharePoint 2010? Twelve years after the standard was published?!

I found a blog about implementing an iCal export, but to be honest, implementing it clean, complete and bugfree, and ideally even two-way is just too much of an effort to start before asking here.

I also found a commercial product called MashPoint, but it's overkill.

The tiny remaining spark of hope makes me put this as a SO question and hope that after the coffee, the whole world looks different all of a sudden.

回答1:

SharePoint does support iCalanders. I am currently using on an events list so people can save to their outlook.

You can download the .ics based on the url like so:

http://yoursite/_vti_bin/owssvr.dll?CS=109&Cmd=Display&List=%7BListID%7D&CacheControl=1&ID=1&Using=event.ics

Replacing yoursite with your host name, ListID with the ID of your list with the events and the ID=1 with whatever list item number you want.

In SharePoint designer you can implement into the page as a hyperlink like the following example:

http://yoursite/Marketing/_vti_bin/owssvr.dll?CS=109&Cmd=Display&List=%7BA742AAC4%2D2654%2D4E64%2D9280%2D7813D2A343A2%7D&CacheControl=1&ID={$thisNode/@ID}&Using=event.ics

I'm not sure about a direct web service to retrieve the iCal if you want to use pragmatically but i'm sure you can just use this URL and a stream reader to save or manipulate.



回答2:

You can use the "RSS Feed" option in the "Calendar Tools" section to help find the correct url. Each item in the RSS feed will have an event.ics generated by the owssvr.dll, which you can then convert to the format described by kravitz88 to get an ics for the whole calendar.

If your original URL was something like this:

http://SHAREPOINT.local/siateam/Lists/Calendar/calendar.aspx

Then inside the RSS item links should look something like this:

http://SHAREPOINT.local/siateam/_vti_bin/owssvr.dll?CS=65001&Cmd=Display&CacheControl=1&List={df83eb1b-0403-42ec-8198-ec523bf1acc1}&ID=254&Using=%2Fsiateam%2FLists%2FCalendar/event.ics



回答3:

Again, maybe not a very direct way of exporting to iCalendar, but this may help to get there anyway. I found on Sharepoint 2007 (and I am not sure whether 2010 has this feature, too, but it's quite possible), that you can create your own views of a calendar by using the "View" button and menu:

  1. Create View
  2. Datasheet View
  3. Give the view a name in the "View Name" field, and select all the fields you want to export in the list below.
  4. Once you have the new datasheet view, this should show all events in the entire calendar in one single (scrollable) table.
  5. Select everything (Ctrl-A), and copy and paste...

I found that MS Excel 2013 for some reason doesn't want to paste the contents of the clipboard thus obtained, but LibreOffice Calc does it just fine without any complaints. The specific calendar I exported in that way had some 1,300 events spread out over five years.

  1. Convert the table thus obtained to iCalendar format... (I haven't done that yet, but that should be the easy part; may have to read the standard: http://tools.ietf.org/html/rfc5545 )


回答4:

Single Calendar Event in iCalendar (iCal/CalDav) format

Open SharePoint calender event, click on the 'Custom Commands' tab and click 'Export Event'. You will be prompted to save a file of '.ics' type - this is the iCalendar compatible file and once opened will work with all calendar clients.