Friday 12 October 2012

Export to Excel in Sharepoint 2010 ribbon( with selected items)


In SharePoint 2010, sites can export custom list items to Excel using the Export to Excel option in the ribbon toolbar. It will export all items in that particular view in which the option is invoked. SharePoint literally is notexporting the items it creates in the query file instead, which will have the view id and helps to query theSharePoint list data and the results are shown in the excel spreadsheet.
Now if I have a requirement something like, I need to export only specific items from the list. Let's say I want toexport only 10 items out of 30 items shown in the view then there is no direct option for that. I need to create a view and apply filter to extract only the specific 10 items which I want to export. But I can' t create views every time to export any specific items. What if I don't have appropriate permissions to create views? To overcome these kind of issues, I have created a component which will export the specific items from the custom list. Its a custom action which will create the "Export to excel" ribbon button. Just selected the items and click on the button in the ribbon to export the items.

How To

  1. Deploy the WSP to the concerned web application
  2. Go to site features and activate the feature
  3. Use the export functionality in the custom list

Download code here Here



Referred from  Here

No comments:

Post a Comment