Useful SharePoint dlls

SharePoint has some great features like exporting list views to Excel or connecting Calendar events to your Outlook calendar. However, this might not always be easy for end users or users might not be willing to use the Ribbon menu to access these features (as in my case). Thankfully using REST, a little JavaScript can put this functionality directly onto a regular page as links to export to Excel or add an event to your Outlook calendar.

Exporting to Excel
In my first example, we had users who were rolling up list data onto a reporting page. From this page they wanted to export a different view of the list that we had set up for them. That, however, required them to navigate to the list and use the export to Excel button in the Ribbon menu:

export

On the reporting page, I added an Excel button with with a class Caption. With a line of JavaScript this can be set to the correct url:

var href = “http:// [sharepoint] / [site] /_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=[List Guid]&View=[View Guid]&CacheControl=1”
$(“.Caption a”).prop(“href”, href);

This will give you a button to export whatever view of the list you would like to Excel:

export_button

As much as, I’d like to take credit for this discovery, check this link below for the thread and this link to another blog with that solution.

Add to Outlook Calendar
In my second example. we created a SharePoint calendar for users to manage events. A workflow sends them an email with the link to the event when they change the category of an event indicating that this is an event they will be attending.

Like the first example. this is also pretty simple. We created a calculated column with the value of the link below:
http:// [sharepoint] / [site] / [list] /_vti_bin/owssvr.dll?CS=109&Cmd=Display&List=[List Guid]&CacheControl=1&ID=&Using=event.ics

Notice the event.ics at the end which give us an ics file to create an Outlook calender event. This can then be included in the workflow email and will give them a link like the below:
outlook_calendar

Advertisements

2 thoughts on “Useful SharePoint dlls

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s