2013-11-13

For one of our customers I had to create dashboard with a few shortcuts to SharePoint actions. One of these actions is an export of a central SharePoint list to Excel. I thought it would be easier to add a link at the dashboard. Otherwise the end-users have to open the list and click two times in the ribbon. One click is always better than three 😉

This is the end result:

Pretty simple and straightforward but it doesn’t always have to look fancy 😉 So how does this work?

The URL to execute the export is as follows:

{Site URL}/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List={List GUID}&View={View GUID}&CacheControl=1

You have to change the List GUID and View GUID corresponding to your SharePoint environment.

List GUID

Go to the List Settings and right click at Audience targetting settings and Copy shortcut.Copy the shortcut in Notepad and you find the GUID. For example:

https://contoso/_layouts/ListEnableTargeting.aspx?List={18cf5fa8-7256-4715-89f9-daa42ceef883}

View GUID

Go to the List Settings and click at the view you want to export to Excel. Copy the URL and past it in notepad. For example:

https://site_layouts/ViewEdit.aspx?List=%7B18CF5FA8%2D7256%2D4715%2D89F9%2DDAA42CEEF883%7D&View=%7BBE72746E%2D85DA%2D41AB%2DBB91%2D73941AF9DC10%7D&Source=%252Fsites%252Fsitename%252Fsitename%252F%255Flayouts%252Flistedit%252Easpx%253FList%253D18cf5fa8%252D7256%252D4715%252D89f9%252Ddaa42ceef883

A very long and confusing URL right? You can find the GUID after View=. In our case this is:

%7BBE72746E%2D85DA%2D41AB%2DBB91%2D73941AF9DC10%7D

There is an awesome site that can decode this long GUID. Go to:http://meyerweb.com/eric/tools/dencoder/

Now you can add your GUID:

<a href="https://sitename/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List={18cf5fa8-7256-4715-89f9-daa42ceef883}&View={BE72746E-85DA-41AB-BB91-73941AF9DC10}&CacheControl=1&RootFolder=" onclick="GoToLinks(this) ;return false;" target="_self">Click here</a>

I hope you find this useful!

This post wouldn’t have been possible without the help of  awesome SharePoint Community. I recommend checking the following sources.

Sources

About the author 

Jasper Oosterveld

My name is Jasper Oosterveld and I live in Amsterdam with my wife Katie, our daughter Flora and our dog Millie. I have been working with SharePoint since 2007 as a SharePoint Consultant. In my role as SharePoint Consultant I support customers with the process of implementing SharePoint. Collaborating in the SharePoint and Office 365 community is a passion of mine. I speak regularly at SharePoint and Office 365 community events such as DIWUG, Office 365 User Group, SharePoint and Office 365 Saturday, SharePoint Connections and the European SharePoint Conference.