Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm using sharepoint 2007, custom list. from the datasheet view I can export the list into excel/access file. is it possible to create a button that proposes to export the list to excel. (in order to alleviate on the end user)

share|improve this question
add comment

3 Answers 3

up vote 4 down vote accepted

I needed to do this for one of my projects. Here are the steps I took.

Generate an export for the data you want to share via the out of the box process (ie via the Action Menu). When prompted, name and save this file locally. This is the Excel Query File and it has information about the site, list and view that generates this data.

Place the file in the SharePoint site. I created a separate document library for this content. Make sure you set the appropriate permissions.

On the page, place the html that launches the query file. I placed it in an html link on a publishing page but this could also exist in a content editor webpart or a link list.

<a href="../filestorage/myExportFile.iqy">Export Data</a>

This was a 2007 site and used FBA for authentication. If you are using FBA, the 'Remember Me' checkbox must be checked on the sign in page for the query to work in Excel.

share|improve this answer
    
If I andertsood correct... the button link to predetermined excel file. and I need that the excel file will change dynamically. is it possible? am I do not understand somthing? –  liron Aug 29 '11 at 12:30
    
Correct. The excel query file contains information about where and what data to retrieve from the site. So, yes, each time the file is open, it will go out to the site and get the latest data. I created a view on the list to get the data how I wanted it and then the Action | Export to Excel used this view for the query. –  Rich Ross Aug 29 '11 at 13:07
add comment

The Actions menu of a Custom List has the "Export to Excel" button in. Are you after more than this offers? If so, what?

Bear in mind that the Export to Excel downloads an Excel Query File, which opens Excel, creates a Data Connection to the list and gets the data.

share|improve this answer
    
I whant to create button that link the user to excel file. in order to make this option more accessible. I know how to create a button, you can look at this article: webcache.googleusercontent.com/…. but I can not make the link to excel file with this button. thanks! –  liron Aug 28 '11 at 12:09
add comment

Another way to do it is:

  1. Create a new Excel file
  2. Retrieve the data from the SharePoint list using Data > Web query
  3. Set the query to be refreshed when the file is opened
  4. Save the file in a SharePoint document library
  5. Create a button that opens the Excel file

This way, the query is inside the Excel file, which allows you to format the document and saves the end user a step.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.