How To Create a Hyperlink to SharePoint's List Export to Spreadsheet

Published Monday, August 22, 2005 1:27 PM
Because you can't copy the hyperlink on the "Export to spreadsheet" link on SharePoint lists, here is how you can create your own hyperlink.

http://[Server]/[Site]/([Subsite]/)_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=[ListGUID]&View=[ViewGUID]&CacheControl=1

Replace the [Placeholders] with your environment's information.  A handy way to get the list and view GUIDs is to go into "Modify Columns and Settings" then scoll down to the views section and click on the view that you want to use.  You will notice the escaped list and view GUIDs in the resultant URL.

Here is an example:

http://MyWSS/sites/samplesite/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=%7BD109453A%2D1A6E%2D4F83%2DAFF9%2DCCA04A75D76D%7D&View=%7B8FB21A2F%2DB62C%2D41D8%2DBA0C%2D7BD9C31FAA51%7D&CacheControl=1

See also, MSDN's article: URL Protocol and my article: How To Add a Hyperlink To a SharePoint Event Outlook Export

Comments

# Ian Morrish said on Monday, August 22, 2005 6:37 PM

I use this all the time when working with SharePoint web services where you need to know the list and view guids and field names.

http://www.wssdemo.com/Shared%20Documents/SharePoint%20Site%20List%20Details.fwp
It is an fwp file which means you use FrontPage to import it from the Tools/Packages/Import menu.
Just remember to change the url it is installed into so that it doesn't
create a subsite. You will see there is only one file in the package which is lists.aspx and it will be copied into the root of your site.
Page looks like this http://www.wssdemo.com/img/ListDetails.jpg

# ewe said on Monday, September 05, 2005 10:58 AM

test

# Westin said on Monday, September 05, 2005 1:49 PM

Ewe, did your test work?

# rachel xu said on Thursday, June 14, 2007 1:55 PM

Super!  Perfect!

Exactly what I am looking for!

Thanks Westin!

# William said on Friday, September 21, 2007 9:01 AM

The link works; but it doesn't work like the export under actions for me.  When I do the export the spreadsheet only contains 3 columns no matter what the list looks like before the export.  Can anyone help?

Thanks,

William

# Anju Shaik said on Wednesday, December 12, 2007 7:49 AM

This is really nice, Thanks!

# Sofia said on Friday, May 16, 2008 10:53 PM

Worked perfectly; thanks so much!

Westin, you're a lifesaver :-)

# Anju said on Tuesday, September 23, 2008 8:09 AM

While exporting to spread sheet I got the following error "EXCEL cannot connect to the sharepoint list".

Any solution? I am using Forms Authentication using Active Directory.

# felipeo8 said on Wednesday, September 24, 2008 1:15 PM

I have some problems when I want to export a view filtering by [Me] and open the excel, there is nothing, only the titles.

Can anybody helpme?

# MOSS2007: Create a Hyperlink to SharePoint List Export to Spreadsheet « rinonu writes… said on Thursday, May 14, 2009 12:03 AM

Pingback from  MOSS2007: Create a Hyperlink to SharePoint List Export to Spreadsheet «  rinonu writes…

# Joe Sharepoint said on Saturday, August 01, 2009 10:43 PM

Spreadsheet Export Link Custom Column Type

# Maria said on Monday, August 10, 2009 12:06 AM

I get an error

an unexpected error has occurred, changes to your data cannot be saved.

office 2003 sp2

# Mordechai said on Friday, September 25, 2009 5:18 AM

Thanks, that saved my life!

# misbips said on Wednesday, October 14, 2009 2:58 PM

Thanks so much for the information!  I wanted to add a bit with regards to surveys....

For surveys it is a bit different since you can't select views.  I ended up going to the view of the survey results that I wanted and then did the view source from the browser.  Using "export to" I found the information regarding the link just above that.

\u002f[Site]\u002f[Subsite]\u002f_vti_bin\u002fowssvr.dll?CS=65001\u0026Using=_layouts\u002fquery.iqy\u0026List=\u00257B880B2537\u00252DEE3C\u00252D4312\u00252D95BC\u00252D4F56FC22106A\u00257D\u0026View=\u00257B633D9301\u00252DEB6C\u00252D4666\u00252D892E\u00252DF42DF94F46AA\u00257D\u0026RootFolder=\u00252F[Site]\u00252F[SubSite]\u00252FLists\u00252F[SurveyName]\u0026CacheControl=1

I replaced the following:

\u00257 = %7

\u00252 = %2

\u0026  = &

\u002f  = /

So eventually it looked like this:

http://[server]/[site]/[subsite]/_vti_bin/owssvr.dll?CS=65001&Using=_layouts/query.iqy&List=%7B880B2537%2DEE3C%2D4312%2D95BC%2D4F56FC22106A%7D&View=%7B633D9301%2DEB6C%2D4666%2D892E%2DF42DF94F46AA%7D&RootFolder=%2F[site]%2F[subsite]%2FLists%2F[SurveyName]&CacheControl=1

Replace placeholders

http://[server]/[site]/[subsite]/_vti_bin/owssvr.dll?CS=65001&Using=_layouts/query.iqy&List=[List GUID]&View=[View GUID]&RootFolder=%2F[site]%2F[subsite]%2FLists%2F[SurveyName]&CacheControl=1

# MOSS2007: Create a Hyperlink to SharePoint List Export to Spreadsheet | La-Roy said on Friday, January 29, 2010 9:59 AM

Pingback from  MOSS2007: Create a Hyperlink to SharePoint List Export to Spreadsheet | La-Roy

Leave a Comment

(required) 
(required) 
(optional)
(required)