I recently had a client that did not want to use the "out of the box" export to Excel feature in SharePoint. Instead, they desired a link that could be added anywhere on a page, capable of also providing this functionality.
Step 1:
First, I had to find the guid of the list and view that they wanted to export to Excel. To do this, I went to their SharePoint site's specific list and view, selected modify this view, and then copied the url from the "edit view" page.
Step 2:
I pasted the url into Notepad and removed everything except for the list and view guid (highlighted in yellow below). http://Mysharepointsite/examplesubsite/_layouts/ViewEdit.aspx?
List=18c5120f%2Db6be%2D4836%2Dbc6c%2D88d3a7e42aa8&View=%7B5C4DB341%2D0AFA%2D460E%2D9FA4%2D0383CC723FF2%7D
Step 3:
I added a content editor web part (CEWP)on the page they desired their link.
Step 4:
Finally, I edited the content editor's HTML source and entered the following:
<a href="http://Mysharepointsite/examplesubsite/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=18c5120f%2Db6be%2D4836%2Dbc6c%2D88d3a7e42aa8&View=%7B5C4DB341%2D0AFA%2D460E%2D9FA4%2D0383CC723FF2%7D&CacheControl=1">Export Report to Excel</a>
Here is a another example:
Just replace the yellow highlighted areas with your site's information
<a href="http://
yoursiteurl/yoursubsite/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&
List=[listguid]View=[viewguid]&CacheControl=1">Export Report to Excel</a>
Please note, I have found that users must have Microsoft Excel 2007 or later for this to work to export. They must also use Internet Explorer or Firefox as their web browser.
My source:
http://weblogs.asp.net/wkriebel/archive/2005/08/22/LinkToExportToSpreadsheet.aspx