.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Custom list export to excel only selected items

Posted By:      Posted Date: September 22, 2010    Points: 0   Category :SharePoint

I want to export selected items from the list to Spreadsheet, currently its exporting all items in view.

My client does not want to use datasheet>>filter>>export option.

Is there any out of box solution to only the selected items to excel? otherwise what would be best way to achieve using coding?


View Complete Post

More Related Resource Links

SharePoint 2010 Export list Items to Excel, wrong url in iqy file

Hi, I have a SharePoint 2010 Environment that uses https://portal.<something>.com. Exporting to Excel of a list uses wrong URL. When I go to the a list, select the list to show the "office ribbon" and then select export to excel, excel will show the error "Excel cannot connect to the SharePoint List". When I take a look at the IQY file that is created it contains the wrong url: http://portal.<something>.com instead of https://portal.<something>.com Changing the URL in the IQY file manualy to https://portal.<something>.com and then opening it will excel is working fine, list data is exported to excel then. Alternate access mapping is configured to use https://portal.<something>.com as default, export to access is working normaly. I already deleted the http://portal.<something>.com alternate access mapping once to see if this fixes the problem. No fix, even not after IISreset or rebooting the server. Where or how is the export to Excel IQY file created and where is it possible to fix the URL it is putting in the IQY file? Grtz, Arjan

Export SharePoint List to Excel Spreadsheet Programmatically using C#

In SharePoint applications, Custom Lists are used to store business data and Document Libraries to store the documents. But for data manupulation and analysis, Microsoft Excel provides very rich features as compared to SharePoint Lists. That's why people still loves to work on Microsoft Excel Sheets.

External List - Access Selected Items

Hello, The situation;- An external list in SP 2010 from SQL A custom ribbon/button that calls via JS a Dialog box(Application page) and passes the selected items IDs Some code behind to process items after confirmation from user. Question is how to access the selected items in the code behind. As far as I can tell the JS 'getselecteditems' only returns the list ID, which in the case of a standard list is fine, but with an External list returns something like '_B00234' - how do I use this or how to return a more meaningfull ID? (I would rather work in my confort zone VB/C# than JS to process items) casey

Excel data to MOSS custom list

Hi, My requirement is that I have some excel sheets on server and i want to import those data into MOSS2007 site custom list. what is the best approach to achieve this?

How to apply color to selected number of items in check box list and drop downlist

Hi all,    I want to apply color to selected number of items in checkbox list and seleted number of items in drop downlist for e.g color red for few items and black (default). I have a bit value set in data base so if bit is set to 0 then red and if 1 then back. Please help me.  

Export to outlook calendar in a custom list?

Howdy, I have a custom list with a calendar view. I think it was originally created as a custom list rather than a straight-out calendar for reasons of functionality. However, obviously this, being only a list, doesn't have the "Export to outlook" or "Connect to outlook" feature. I can't really recreate the list from scratch because it's been used for quite a while with a lot of content and custom fields, so is there a way of adding this feature? Thanks, Clark.

Can't export list to Excel - "You do not have adequate permissions..."

Hello, SP 2007 (, Office 2010, Win 7 Pro x64. When I try to export a list to Excel, I get this error: "You do not have adequate permissions to modify this list.  Changes to your data cannot be saved." This comes right after I am prompted to enable data connections, and the Import Data dialog. I get this error on two different computers; I have tried several browsers (IE8 32-bit, FireFox, Iron). How do I fix this problem?  Thanks.

Create dynamic dropdown list when we export data to excel using SSRS.


Hi All,

I have assigned a work to create a report, that should render in excel with dropdown list. i.e. report should contain a input parameter as a table names, when user selects the table name, report should show only the field names of the selected table. Some of the field name have look up values that values should be displayed as dropdown when we export to excel.

Can any one have any idea how to proceed with this report?



How to delete custom list items programmatically?


Can anybody tell me how to delete custom list items programmatically?


Import and Export List data in excel sheet


Hi ,

I need to import based selective data from excel sheet and export data from sharepoint list, I'm new in Sharepoint.

can anybody guide me? What all possible ways are there and which would be the best.



Sharepoint Export Import List Items



My requirement is to export the list items in Pages library with its meta data i.e. Created Time and Modified Time.

I am trying Export Import code, but it does not import time. It imports the CreatedBy and ModifiedBY acuurately but createdTIme and Modified Time comes as current time, the time i run the import.

Pls help


private static void ExportItems()
      string exportFolder = @"C:\exports\";
      string exportFileName = "Export_File.cmp";

      using (SPSite site = new SPSite(sourceSiteUrl))
        using (SPWeb oWeb = site.OpenWeb())
          SPList oList = oWeb.Lists["Pages"];
          SPListItem oItemA = oList.GetItemById(2480);

          SPExportObject exportObject = new SPExportObject();
          exportObject.Id = oItemA.UniqueId;
          exportObject.Type = SPDeploymentObjectType.ListItem;

          SPExportSettings exportSettings = new SPExportSettings();
          exportSettings.LogExportObjectsTable = true;
          exportSettings.LogFilePath = exportFolder + "Exportlog.log";
          exportSettings.SiteUrl = sourceSiteUrl;

Add items to sharepoint custom list using javascript with webservices



Here is the code snippet i was trying to insert item to sharepoint list but i conn't please help me what is wrong in my code and modify it.


function addlistitem(item)


var xmldoc;

var batch;

var FeedbackHTTP;

var ListName = 'Suggestions';

//The batch variable builds up the XML that we are going to submit to the SharePoint list via the SharePoint web service

batch = "<batch><method id='1' cmd='New'><field name='Title'>" + item + "</field></method></batch>";

xmldoc = '<?xml version="1.0" encoding="utf-8"?><soap:envelope xsi="http://www.w3.org/2001/XMLSchema-instance" xsd="http://www.w3.org/2001/XMLSchema" soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:body><updatelistitems xmlns="http://schemas.microsoft.com/sharepoint/soap/">'

xmldoc = xmldoc + '<listname>' + ListName + '</listname>';



xmldoc = xmldoc + '<updates>' + batch + '</updates></updatelistitems></soap:Body></soap:Envelope>';

FeedbackHTTP = new ActiveXObject("MSXML2.XMLHTTP.3.0");


How to Access List view webpart selected items


I'm displaying a list view in list view web part on web part page.

I want a solution to get selected items from the list view web part.

As I am displaying these results on web part page, i don’t have access to ribbon to add any custom buttons.

Any client side or server side code solution should be fine.

Thanks in advance.


I tried this code but it's returns null values


var ctx = SP.ClientContext.get_current();
              var items = SP.ListOperation.Selection.getSelectedItems(ctx);
              var myItems = '';
              var k;
              for (k in items)

Excel "Keep Only Selected Items" is SLOW against cubes


When connected to an AS database, we can use the Excel pivot table filter technique “Keep Only Selected Items” on some dimensions but not others.  I have a fairly large dimension that can handle it no problem ( < 1 second ) and another smaller dimension that takes several minutes to return a result.  During that time, there is very little SQL Profiler activity on the AS Server and very high processor use on the Excel machine.  In both cases there is very little time logged on SQL Profiler between Query Begin and Query End – the query is fast.  It is also quick to run the same MDX query in Mgt Studio. 

Is this a solve-able problem?  The analysts here use this function pretty heavily. 


Advanced Search does not show items from Custom List- why?



I have search working in general for site. However, when I run it only picks up files - not list items. Even List search in top right comes up with blank results.  

I read somewhere that this is switched off due to size of search results.

Can someone tell me how to include List Items in search?



How can I get a list of selected items from a multiple-selection box in Infopath 2007

I have an Infopath 2007 form with a multiple-selection box.  The form has a receive data connection to a Sharepoint custom list which shows software available to staff.  The form allows the user to select any number of items from the list of software.  I want to be able to show a summary list and more importantly print a summary of just the items from the list that were selected.  I want to be able to hand my IT person a list of the software that user needs installed.   I am trying to figure out how to get this summary list so it can be printed out.  Any help would be appreciated.
Renee Boyd

Create custom template for Exporting a list to Excel?


I have noticed when you are in the Datasheet View of a List, and if you choose "Query List with Excel" from the task pane, that when the list opens in Excel is it in a formatted worksheet (alternating colors/rows of light blue and dark blue). Yuck!

Anyway, I want to be able to Export the data to an Excel worksheet in a format of my choosing. Our team will want a minimalist approach that is setup for proper printing with defined page breaks, etc. So, I would like to know how I can develop that kind of export template. Thanks!

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend