1

I am using Sharepoint Server 2010, and need to use OOTB features only. I have created a page with a web part on it, using a view from my list. The webpart works on parameters entered on the page. When I use the 'Export to spreadsheet' option from the list view, all works fine. However, from the web part, only the column headers appear in the Excel spreadsheet. I saw a similar question at Export to Excel - no data besides column headers But there doesn't seem to be an answer. I do not want to add custom code. Can anyone help?

  • Hi, I'm still looking for an answer on this. I've seen a few similar issues with exporting a filtered list from SP2010 to Excel, but they are quite old, so I'm hoping this might have been resolved. My webpart uses filters from other webparts on the page, and I then want to use the 'Export to spreadsheet' item on the webpart toolbar to export. The export only gives me the column headers in Excel, without the data. However, if I use the same toolbar option from the list view (no filters), it exports ok. How can I export the filtered data only? Any help greatly appreciated. – Mandy Nearhos Dec 9 '15 at 11:29
2

Just add one link and pass the below URL to that link, no need to write the code. Just prepare the view of the respective list and export it to excel.

http://servername:port/sitename/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List={ListID}&View={ViewID}&CacheControl
  • Sorry, I don't understand what you mean. Where do I add the link, and what parts of the URL do I need to adapt for my server? – Mandy Nearhos Dec 5 '15 at 7:02
  • Just add one link to page and pass the URL. That I have mentioned, passing the servername, your site name, list Id and its view id. You will get your excel sheet of your respective list. – Niranjan Kulkarni Dec 6 '15 at 17:24
  • I don't think this is answering my question. I have a web part on my page, and am trying to use the Eport to spreadsheet – Mandy Nearhos Dec 7 '15 at 5:19
  • I don't think this is answering my question. I already have a web part on my page, and am trying to use the Export to spreadsheet toolbar item on that webpart. I don't see why I need to add another URL? The web part uses a filter from further up the page to identify which items to display, and those are the items that I want to export to Excel. – Mandy Nearhos Dec 7 '15 at 5:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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