Create Link to Export Library Contents to Excel

Create Link to Export Library Contents to Excel

I have a site where we needed to create a set or simple links for general tasks which would normally be accessed through the SharePoint 2010 ribbon.  For this particular case, I needed a link that would export the contents of a SharePoint library to Excel.  It’s actually very easy to do if you follow this format.

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

Getting the site URL is easy, you already know this 🙂

To get the list GUID, go to your list, then list settings.  Copy the contents of the browser address bar and just grab what is after the List=.

For Example:

https://onfire.sharepoint.com/demo/mobile-work-pro/_layouts/listedit.aspx?List={3327A142-848C-4071-9281-3CCEE5D0ADE8}

To get the view GUID, go to your list, select the view then modify view.  Copy the contents of the browser address bar.  Paste into Notepad and copy what is between “View=” and “&”.

https://onfire.sharepoint.com/demo/mobile-work-pro/_layouts/ViewEdit.aspx?List=%7B3327A142%2D848C%2D4071%2D9281%2D3CCEE5D0ADE8%7D&View=%7B337DD9FC%2D77AE%2D45A4%2D9961%2DE8535591129E%7D&Source=%252Fdemo%252Fmobile%252Dwork%252Dpro%252F%255Flayouts%252Flistedit%252Easpx%253FList%253D%25257B3327A142%25252D848C%25252D4071%25252D9281%25252D3CCEE5D0ADE8%25257D

So…

%7B337DD9FC%2D77AE%2D45A4%2D9961%2DE8535591129E%7D

You will need to “decode” the list view GUID, which is pretty simple and outlined here.  Alternatively, you can use this URL Decoder/Encoder tool.

  • Replace %7B with {
  • Replace %2D with –
  • Replace %7D with }

or:

{337DD9FC-77AE-45A4-9961-E8535591129E}

So now your hyperlink would be:

https://onfire.sharepoint.com/demo/mobile-work-pro/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List={3327A142-848C-4071-9281-3CCEE5D0ADE8}&View={337DD9FC-77AE-45A4-9961-E8535591129E}&CacheControl=1

By |January 25th, 2013|