Microsoft 365 SharePoint

SharePoint – Create a link to export to Excel

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:

ExportToExcel_1

 


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:

http://sdrv.ms/1aWK4ay

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:

Click here

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
http://www.formsonfire.com/office-365/create-link-to-export-library-contents-to-excel/
http://sarahlhaase.wordpress.com/2012/08/21/how-do-i-change-the-url-users-are-sent-to-after-they-fill-out-a-new-item-form/#comment-952

You Might Also Like

6 Comments

  • Reply
    Geert van Raaij
    November 13, 2013 at 8:52 am

    Thanks for the tip Jasper.
    Do you by instance also have a solution for the fact that the “Export to Excel” doesn’t work with Chrome browser?

  • Reply
    Jasper Oosterveld
    November 13, 2013 at 10:32 am

    Hi Geert, Unfortunately I don’t have a solution for that issue.

  • Reply
    Geert van Raaij
    November 13, 2013 at 11:31 am

    That’s a pitty. Nevertheless thanx!

  • Reply
    Alan H
    April 20, 2015 at 4:06 pm

    For Chrome, try replacing “target=”_self” with: download target=”_blank”

    Ref: http://stackoverflow.com/questions/3802510/force-to-open-save-as-popup-open-at-text-link-click-for-pdf-in-html

    • Reply
      Jasper Oosterveld
      April 20, 2015 at 4:10 pm

      Thanks Alan! Appreciate it 🙂

  • Reply
    Jennifer S
    October 10, 2018 at 6:40 pm

    When I try this I get an error: Cannot complete this action. Please try again. I’ve triple checked my GUIDs and I’m using IE. Any thoughts?

  • Leave a Reply to Geert van Raaij Cancel Reply

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