Click here to Skip to main content
15,881,248 members
Articles
Tip/Trick
(untagged)

SharePoint 2010 Copy List Items Across Sites

Rate me:
Please Sign up or sign in to vote.
2.00/5 (1 vote)
13 Jun 2012CPOL4 min read 26.5K   1
One way of copying a list from one site to another.

Introduction

In this article, I would like to demonstrate one way of copying a list from one site to another. Obviously there are many ways of doing it and I would like to use the way in which we do not need any other tools.

Scenario

Our source list is named Contacts in the default site. You need to copy this list to another site named Research.

Steps Involved

Following are the steps involved:

  1. Create the Contacts List
  2. Save as Template
  3. Download the Template file
  4. Create new site
  5. Import the Template in new site
  6. Create List from Template

Step 1: Create the Contacts list

To proceed with, we need a list with data. Create a Contact list in the default site with the following columns:

  1. Title
  2. Name

Add some data to the list as shown below:

Image 1

Step 2: Save the list as Template

Now we can proceed with saving the list as a template file. Open the list and go to the List tab and click on List Settings as shown below:

Image 2

In the appearing page use the Save list as template link.

Image 3

In the page appearing, enter the following details. Please remember to check the Include Content checkbox as shown below:

Image 4

In the above page, we are specifying the file name of the template. By checking the Include Content checkbox, we will get the file with list data too. After everything is entered, click the OK button. You should get the following message:

Image 5

Now the list template is created and copied to the Template Gallery.

Step 3: Download the Template file

Click on the OK button from the previous screen and you can see the Template Gallery.

(You can also take the screen from Site Actions > Site Settings > List templates link)

Image 6

Now click on the Contacts List item to download the file.  You should get the file as Contacts List.stp. Try to open the file inside notepad and you can see the following content.

Image 7

So now we are ready with the List Template file.  We can also share this file to others to get deployed to another site.

Step 4: Create new site

We need to create a new site to test the importing of template. Please go to the Central Administration web site and create a new site collection named Research.

Image 8

You can name the site as Research Way template from Document Workspace.

Image 9

After entering the details like site name, template, User name click on the OK button.

Image 10

In a short while the site will be created.

Image 11

Please copy the URL from the above screen.  You will need it in the next step.

Step 5: Import the Template in new site

Now open the new site collection and go to Site Actions > Site Settings > List Templates

Image 12

In the appearing page you can see there are no items.

Image 13

Now we need to upload our STP file into this list. Click on the Documents tab and then Upload Document button.

Image 14

You will get the following dialog.

Image 15

Select the file which you saved in the previous step and click the OK button.  You will get a prompt and continue with OK button.

Now the STP file is added to the templates as shown below:

Image 16

Step 6: Create List from Template

This is the last step and now you can proceed to create the list from this template.  Please go to the Home Page and click on the Lists link.  Further click on the Create button.

In the appearing dialog click the Lists from left Pane and you can see the Contacts List there.

Image 17

Select our Contacts List template, enter the name and click the OK button.

Good! Now you are ready with the new List with Data as shown below.

Image 18

So this concludes our article on Copying List items across Site. Hope you have enjoyed it.

What is the expansion for STP file?

STP represents SharePoint Template.

Summary

In this article we have explored a way of copying list data from one site to another. In real world we might need to copy data from one site to another site in production. I hope this method will be useful in a manual way.

References

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
United States United States
Jean Paul is a Microsoft MVP and Architect with 12+ years of experience. He is very much passionate in programming and his core skills are SharePoint, ASP.NET & C#.

In the academic side he do hold a BS in Computer Science & MBA. In the certification side he holds MCPD & MCTS spanning from .Net Fundamentals to SQL Server.

Most of the free time he will be doing technical activities like researching solutions, writing articles, resolving forum problems etc. He believes quality & satisfaction goes hand in hand.

You can find some of his work over here. He blogs at http://jeanpaulva.com

Comments and Discussions

 
GeneralMy vote of 2 Pin
Selvin13-Jun-12 22:19
Selvin13-Jun-12 22:19 
From "Help->About Us"
"The Code Project was formed to provide developers with a place to meet and exchange ideas. We hope to provide developers with all the resources they need to help them in their day to day programming..."

so where is some code?

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.