In the SharePoint 2010 sites users will be able to export the custom list items to excel using the export to excel option in ribbon toolbar. It will export all the items in that particular view in which the option is invoked. SharePoint literally is not exporting the items it creates iqy query file instead, which will have the view id and helps to query the SharePoint 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 to export 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
- Deploy the Rjesh.Solutions.wsp to the concerned web application
- Go to site features and activate the feature "Export Selected Items to Excel"
- Use the export functionality in the custom list
Demo Video
Download
You can download the WSP and code from here
Update
You can download and read about the latest release over here http://gallery.technet.microsoft.com/SharePoint-2010-Export-ede385b9/file/97734/2/Rjesh.Solutions.wsp
how to remoave id;# from lookup column or personal or group
ReplyDeleteWhere can I download the source code from? I need to get this to work for Office 2013
Deletehttps://github.com/rjesh-git/ExportSelectedItems
Deletehi can you please send me a wsp file to my mail id, since i do not have permission to download anything from here. please help me.
ReplyDelete@ramanjulu, please share your email id.
ReplyDeleteHi Rajesh
DeleteThanks for your solution...............
Could you please proved me that wsp solution file................
maheshk8703@g,ail.com
maheshkommu1986@gmail.com
Hi Rajesh,
ReplyDeleteThanks a lot for your quick reply. at last i have deployed the solution and activated the feature, but i do not see the icon(ExportToExcel) in the ribbon. i have checked 14\images\ExcelIcon.png is also available. Can you please guide me what could be the reason. this is my mail id: "ramanjulu.n@isgn.com"
@ramanjulu,the button will be shown in the items tab in the custom list ribbon. If the feature was properly activated. About the image you should check inside the \Images\Rjesh.Solutions\ folder structure in the 14 hive. Hope this helps.
ReplyDeleteHi Rajesh,
ReplyDeleteI need this button to be displayed in the document library(library category can be anything). can this be done? Please suggest.
hi rajesh,
ReplyDeletethis feature is available for document library or can we assign this feature to doument library in the coding itself. if yes, please help me how to do this.
@Ramanjulu, you can make it work for the document library with some changes to the ExportSelectedItems element.xml.
ReplyDelete1. Change the registration ID to 101 - which will set it for document library
2. Change the CustomUI Defintion where you want to show the button in the Document library ribbon.
If time permits I will post a blog with the screenshots. Happy coding
Thank you so.........much Rajesh, i have succeeded by doing so. but there is a problem in exporting. I have two "lookup" columns. when i export the list items(selected or all) to excel, these two lookup columns not exporting exactly what is there in the list. lets say i have "Vendor" in one lookup column, after exporting it will be "2;#Vendor". so i want to see only Vendor not the symbols and numbers. i do not know from where it is capturing numbers and symbols. other list column has "Cordy, Inc", in excel "1009;#Cordy, Inc". please guide me.
ReplyDeleteIts fixed in the Release 1.1.0 along with the other issues. You can download the latest 1.1.0 WSP from here http://bit.ly/V69LMt
ReplyDelete@Rajesh, good job!
ReplyDeleteTrying to change the project to export all of the list items. I got it working in a Standard View, but the code breaks in Datasheet View. What updates need to be made to the .js file?
@Lisa, Thanks for the comments.
ReplyDeleteThis components has been designed for the standard view. In the data sheet view, the client object model's getSelectedItems api won't work. I'll disable (gray out) the export button in the ribbon like other out of the box controls. Mean while I look for alternatives to achieve this in Data sheet view. Please subscribe through Facebook/Feeds for the updates.
Hey Rajesh, this is a great solution. But I have one question. Can I export the entire view with this feature and not only the selected items? I have a problem with the default "Export to Excel" button, so I am trying to do this with your solution.
ReplyDeleteThanks, Boris
@Boris, you can use the select all and export all the items in the page using this feature. It won't export all the items in the view. The contents in the might be folded in multiple pages with the pagination. This feature can export the items in that particular page only.
ReplyDeleteHi Rajesh,
ReplyDeleteI notice that this only works to items in a list directory. How can I export items that are inside a site page. Thanks!
Hey Rajesh, this is a great solution. But I have one question. The export hungs as soon as I select an item that has a value in a managed metadata column? Can you help me?
ReplyDeleteThanks, Roland
@Roland which version are you using? Can you try the 1.1.0 version?
ReplyDeleteHi Rajesh,
ReplyDeleteYes I have downloaded the 1.1.0 version and I did modify the code so that I can use on different type of tables. I will start debuging the code but i just wanted to know if you had the same issue.
Thanks
Roland
It's fixed in the latest version 1.1.0. So your debugging should help.
DeleteIt doesn't work in record center site library
ReplyDeleteNever tried with record center, good catch. will fix it soon.
DeleteI tried with the records center - Drop Off Library. I don't see any issues in that. Make sure that the feature is activated at the record center site level. Give some more details on the error you get.
DeleteHi Rajesh!
ReplyDeleteGreat solution thank you so much, it help me alot.
Hope this solution will eventually support some metadata fields.
God Bless.
Thanks for the appreciation. Metadata field issue is fixed in the Release 1.2.0.
DeleteHi Rajesh, great work, just came across your solution, unfortunately also doesnt work with a forms library , can you post the code somewhere so i can see what the problem may be ? thanks
ReplyDeleteThanks for the appreciation. Forms library issue is fixed in the Release 1.2.0.
DeleteHi Rajesh,
ReplyDeletecan you please make available latest version in Codeplex, i didn't find any downloads for the latest version.
and thanks for the wonderful solution.
Thanks,
JK
Hi Rajesh,
ReplyDeletegreat solution, but I have a problem - it doesn't work in IE8.
When I try to export I have a message "Web site not found".
What can be the metter?
Hi Rajesh,
ReplyDeleteThe great solution for Sharepoint world. Can you please send me the source code of latest version, please? shilabhadra@live.in
Would you publish a SandBox version ? thx
ReplyDeleteIt requires server side coding for response in excel format, so there is no sandbox version.
DeleteHello Rajesh,
ReplyDeleteIs it also possible to select which list columns to export?
Thanks,
Jimmy
Hi Jimmy,
DeleteIt exports all the columns in that particular view, in your case you create a public or personal view with the select columns and then you can export to excel.
Is this possible only with Excel 2010? I have Office 2007 product only....
ReplyDeleteAlso is this viewable to anonymous users? Your reply will be of much help
-Anu
Hi Anu, its not dependent on the version of office you use. You can use any version, the exported file is an excel file with an extension of .xls. About your query on anonymous users, I have never tried this but I don't see any issues with that. If possible I can give a try with that configuration also.
DeleteThanks for your reply. I have not yet got a site with anonymous users enabled but I was trying to evaluate the possibilities in case if I implemented this.
DeleteThe user should be able to only view the list and not have any other permission. Do you think he will still be able to access it?
I will let you know as soon as I get my hands on the site.
-Anu
For the users only with the view permissions, yes they will be able to access it.
DeleteHi Rajesh
ReplyDeletehow can i export to excel my filter selected list in my sharepoint 2010, what will i do.
After applying the filter select all items and then click on export button in ribbon.
DeleteHi Rajest
ReplyDeleteIs it possible to export a list, with more than 100 elements selected???
There is a limitation in SharePoint 2010 that you wont be able to select more than 100 items from any list.
DeleteHi Rajesh,
ReplyDeleteI am trying to add "Export to Excel" button in the listview webpart actions menu toolbar but not succeed. Could you please give me the suggestions how can i add your button code in the list view tool bar menu.
Hi Rajesh,
ReplyDeleteThe calculated column field value gets displayed as "float;#51.1139000000000" when the original value is "51.11" This is when the calculated column is created using columns that are of datatype "Number".
Thanks for sharing the info, will look into it.
DeleteIts fixed in http://gallery.technet.microsoft.com/SharePoint-2010-Export-ede385b9/file/97734/2/Rjesh.Solutions.wsp
DeleteThanks
DeleteHi Rajesh,
ReplyDeleteI finished deploying your solution and it worked like magic for stand-alone forms and document libraries! However, it didn't work in my exact scenario where i create a webparts mashup to implement an inter-connected portal between multiple libraries - as suggested in this post http://msdn.microsoft.com/en-us/library/gg293116(v=office.14).aspx.
The "Export to Excel" button does not appear in the "Share and track" subcategory under the Document Tab. Any chance you could assist me bring this functionality to work in Webparts mashup?
I appreciate your efforts.
Thanks,
Anthony.
Your solution is awesome. It was working great until a few days ago. I can no longer export lists with lookup columns. Can it be affected by the User Profile Service being turned off?
ReplyDeleteYou're awesome Rajesh. It would be awesome if you did guide on how to create this solution in Visual Studio.
ReplyDeleteThe source code would save us from some reflection!
ReplyDeleteHi, Rajesh.
ReplyDeleteYour App is the best one. I know you'll think I'm a little MAD, but I'd really like if you give me that code, because I'm trying to develop something similar, and It seems like this is a perfect code. Please, I need your help.
Please give me an answer as faster as you can, I'm in a hurry!!
Best regards,
Hello!
ReplyDeleteI hope you can help me. I have a custom list in SharePoint 2013. The list contains several items. What I wish to do, is that when a client visits my site, he can select the items he wishes to have and export only those items to a new list. It is like Export to Excel function already integrated into SP13 but the integrated function always exports the whole list.
I tried the solution you made for SP10(being optimistic) but it doesn't show in ribbon.
I hope you can help me and thank you in advance!
Hi Rajsh
ReplyDeleteDo you How Can I export selected items to excel in SharePoint 2013 list ?
I tried it once in my on premise environment, it worked. Its a farm solution so you can deploy it only on your on premise environment. Make sure that you activate the feature also post deployment.
ReplyDeleteRajesh,
ReplyDeleteThank you for all your hard work in developing this solution. I recently downloaded the v1.2.1 wsp. Deployed it to my SharePoint 2010 environment, then activated the feature. Works great when there are no lookup columns. However, when there are lookup columns, upon item selections and clicking the Export to Excel, I get a red box message with, "We regret for the inconvenience, some error has occurred. Please contact the administrator."
I remove the lookup columns and the export works just fine. Is there a fix for this? Is there something I need to change?
Thank you for your help.
- Welch
Hi Welch, sorry about the error. Exporting the look up column is one of the main test cases in my testing and I wonder why its failing in your case. Can you more details about the look up column in order to reproduce it at my end.
DeleteThank you for responding. We are in dire need of this export solution and functionality so we got a membership with CloudShare so that we have a test environment to test the solution. The CloudShare VM environment is as follows:
DeleteDescription: OS: Windows Server 2008 R2 x64 SP1
Spec: 80 GB HD / 8 GB RAM
Installed:
• SQL Server 2012 Business Intelligence Edition with PowerPivot, PowerView, SSRS (Native Mode and SharePoint Mode), SSAS (Multidimensional and Data Mining Mode, PowerPivot for SharePoint, Tabular Mode)
• Microsoft SQL Server 2012 PowerPivot for Microsoft Excel 2010
• Microsoft SQL Server 2012 Report Builder
• Microsoft SQL Server 2012 Performance Dashboard Reports
• Adventure Works for SQL Server 2012 Sample Databases
• Excel PowerPivot Sample Workbooks
• Visual studio 2010
• SharePoint Designer
• Office WebApps SP1
• Office 2010 Pro
• Visio 2010 Premium Edition
• Adobe Reader
I created a web application, a site collection, and site. Created a document library and a custom list in the site. Uploaded a couple documents to document library. Custom list would be used to let users add comments/reviews about specific documents in the document library. So there are two lookup columns in the custom list. One references the document library ID (thus providing link to document), and other field is the Title field. Both the document library and custom list allow for management of content types. Created two views, one that includes the lookup columns and one that has no lookup columns.
Downloaded and deployed your 1.2.1 Export to Excel WSP file. Activated the feature within the site. Export to excel works in view without lookup columns, and gives the "We regret for the inconvenience, some error has occurred. Please contact the administrator." in a red box when exporting to excel with lookup columns.
I hope that gives you a clearer picture of exactly what I did and hope you can help.
Thank you very much for your time and help.
- Welch
Hi. do you have sharepoint2013 version.. please could you add support for Publishing pages library
ReplyDeleteThx
Marin
Hello Rajesh
ReplyDeleteI think its a nice Webpart but I have Problems to use it.
The deployment is done without Errors and i can see the Icon in the ribbon.
But when i select some files and click on the button i receive this message: "Unexpected response from the server. The status code of the response is '404'. The status text of the response is 'Not Found'."
Is somthing wrong with the deployment?
The Version is 1.2.1
Many thanks for your answer
Lg Eric
Thank you for your post. Is there any way I can download the source code? I can only see the .wsp file to download.
ReplyDeleteThanks!!
Thank you for your post. I do have a question. When exporting the items from the document library, the link to the document is not exported. It just exports the name of the document but not the link where we can click, which will open the document. Am I the only one having this issue or is the code supposed to work like that?
ReplyDeleteThanks for the post. Can you tell me if this only works for specific lists? Will it work with custom lists? I have installed it and on the lists that we have set up with custom columns and it doesn't seem to work but the out of the box list show the Export to Excel option.
ReplyDeleteThanks again. The solution uses .xls as the file format. Is there any way we can change it to .xlsx. I tried doing that but I could not do it successfully.
ReplyDeletehi.. this is what I want exactly but exporting all items is not possible her. can you share the source code to learn this. my id is sowmiya6262@gmail.com
ReplyDeleteThanks in Advance.
hii Rajesh,
ReplyDeletei m getting error while exporting selected Columns,
"We regret for the inconvenience, some error has occured. Please contact the administrator."
, the view contains 3--4 Lookup columns.
what is the cause ?
Hi Rajesh,
ReplyDeleteCan you please help me how to download wsp file.
Hi Rajesh,
ReplyDeleteI've installed and activated the wsp file in SP 2013.
When I select the items to export in a list and then click in the export button, I get the message:
"We regret for the inconvenience, some error has occured. Please contact the administrator."
Is it because I'm using SP 2013 instead of 2010? Is there a way to correct it?
Thank you in advance!