The SharePoint list has the crucial data. But due to some of the situations such as mergers, changing tenants, and many more, you need to transfer SharePoint list to another site. The whole process of list transfer to another site is performed by the administrator because Office 365 admins have different roles and responsibilities.
Different Methods to Move SharePoint List to Another Site
There are different methods through which you can move a list from one SharePoint site to another site. You will get to know about a Professional tool, Template method, PowerShell commands, and also the exporting & import list items. So, let’s get started.
Migrate SharePoint List to Another Site Professionally
Preserving data integrity and security is the major concern of organizations nowadays. To fulfill all these requirements, SharePoint administrators recommend the SysTools SharePoint Migration Software.
Using this software one can move bulk SharePoint lists to another site. This software offers several advanced features that simplify the moving of SharePoint list items to another site without losing any content. You can also copy document library from one site to another using this tool. Follow the steps explained below sequentially.
Step 1. Download and Install the software on your machine.
Step 2. Choose the platforms as Office 365 for both Source and Destination.
Step 3. Now, from the workload section, choose the sites option.
Step 4. Choose the sites based on Date that are required to move to another site.
Step 5. Add the credentials of the both Source and Destination accounts.
Step 6. Load the Users and Sites into the tool using Fetch Users, Import Users, and Download template options.
Step 7. After the successful validation of the users and sites, click on the Start Migration button to migrate SharePoint list to another site.
Move SharePoint List to Another Site Using the Template method
In this method, you need to create a template of the source SharePoint site for the successful migration. Then you can migrate that template to the destination. But do not forget that the template method is only applicable for the small size of sites. If the template size is bigger than 50 MB, then it will not work. Follow the below steps.
Step 1. Save List as Template
- Open and log in to the SharePoint.
- Click on the List settings icon.
- Now go to the Permissions and Management section.
- Save the list as a template option.
Step 2. Copy of the Template
- Go to the collection of sites.
- Click on the Site Settings icon.
- Now Galleries >> and List template.
- Tick the checkbox next to the template needed to export.
- Now hit on the Download copy button.
Step 3. Export Template to Destination Site
- Go to the destination site with the .stp file.
- Click on the Site Settings & Galleries.
- Click on the List template and then the Documents tab.
- Now hit on the Upload Document option and browse the file.
- Click OK and the process is completed.
Copy SharePoint List to Another Site Using PowerShell
You can also use the PowerShell to move the SharePoint list to another site. But you should be good enough to handle all the complicated PSH commands. Because of some difficult commands, it is not advised to use.
But, if you want to move forward with the PSH commands then, you need to create lists on both sites with the same rows and columns. Execute the PowerShell as administrator. By using the PowerShell commands there is a huge risk of data loss as well.
If the list is not having any attachments then run,
Install-Module -Name PnP.PowerShell #Connect to the Source Site Connect-PnPOnline -Url https://[entertenantname].sharepoint.com/sites/[name of source site] -Interactive #Create the Template Get-PnPSiteTemplate -Out C:\Temp\Lists.xml -ListsToExtract “List A”, “List B” -Handlers Lists Get the List Data Add-PnPDataRowsToSiteTemplate -Path C:\Temp\Lists.xml -List “List A” Add-PnPDataRowsToSiteTemplate -Path C:\Temp\Lists.xml -List “List B” #Connect to Target Site Connect-PnPOnline -Url https://[entertenantname].sharepoint.com/sites/[name of destination site] -Interactive #Apply the Template Invoke-PnPSiteTemplate -Path “C:\Temp\Lists.xml”
If the list items contain attachments then,
#Function to copy attachments between list items Function Copy-SPOAttachments() { param ( [Parameter(Mandatory=$true)] [Microsoft.SharePoint.Client.ListItem] $SourceItem, [Parameter(Mandatory=$true)] [Microsoft.SharePoint.Client.ListItem] $DestinationItem ) Try { #Get All Attachments from Source list items $Attachments = Get-PnPProperty -ClientObject $SourceItem -Property “AttachmentFiles” $Attachments | ForEach-Object { #Download the Attachment to Temp $File = Get-PnPFile -Connection $SourceConn -Url $_.ServerRelativeUrl -FileName $_.FileName -Path $Env:TEMP -AsFile -force #Add Attachment to Destination List Item $FileStream = New-Object IO.FileStream(($Env:TEMP+”\”+$_.FileName),[System.IO.FileMode]::Open) $AttachmentInfo = New-Object -TypeName Microsoft.SharePoint.Client.AttachmentCreationInformation $AttachmentInfo.FileName = $_.FileName $AttachmentInfo.ContentStream = $FileStream $AttachFile = $DestinationItem.AttachmentFiles.Add($AttachmentInfo) Invoke-PnPQuery -Connection $DestinationConn #Delete the Temporary File Remove-Item -Path $Env:TEMP\$($_.FileName) -Force } } Catch { write-host -f Red “Error Copying Attachments:” $_.Exception.Message } } #Function to copy list items from one list to another Function Copy-SPOListItems() { param ( [Parameter(Mandatory=$true)] [Microsoft.SharePoint.Client.List] $SourceList, [Parameter(Mandatory=$true)] [Microsoft.SharePoint.Client.List] $DestinationList ) Try { #Get All Items from the Source List in batches Write-Progress -Activity “Reading Source…” -Status “Getting Items from Source List. Please wait…” $SourceListItems = Get-PnPListItem -List $SourceList -PageSize 500 -Connection $SourceConn $SourceListItemsCount= $SourceListItems.count Write-host “Total Number of Items Found:”$SourceListItemsCount #Get fields to Update from the Source List – Skip Read only, hidden fields, content type and attachments $SourceListFields = Get-PnPField -List $SourceList -Connection $SourceConn | Where { (-Not ($_.ReadOnlyField)) -and (-Not ($_.Hidden)) -and ($_.InternalName -ne “ContentType”) -and ($_.InternalName -ne “Attachments”) } #Loop through each item in the source and Get column values, add them to Destination [int]$Counter = 1 ForEach($SourceItem in $SourceListItems) { $ItemValue = @{} #Map each field from source list to Destination list Foreach($SourceField in $SourceListFields) { #Check if the Field value is not Null If($SourceItem[$SourceField.InternalName] -ne $Null) { #Handle Special Fields $FieldType = $SourceField.TypeAsString If($FieldType -eq “User” -or $FieldType -eq “UserMulti”) #People Picker Field { $PeoplePickerValues = $SourceItem[$SourceField.InternalName] | ForEach-Object { $_.Email} $ItemValue.add($SourceField.InternalName,$PeoplePickerValues) } ElseIf($FieldType -eq “Lookup” -or $FieldType -eq “LookupMulti”) # Lookup Field { $LookupIDs = $SourceItem[$SourceField.InternalName] | ForEach-Object { $_.LookupID.ToString()} $ItemValue.add($SourceField.InternalName,$LookupIDs) } ElseIf($FieldType -eq “URL”) #Hyperlink { $URL = $SourceItem[$SourceField.InternalName].URL $Description = $SourceItem[$SourceField.InternalName].Description $ItemValue.add($SourceField.InternalName,”$URL, $Description”) } ElseIf($FieldType -eq “TaxonomyFieldType” -or $FieldType -eq “TaxonomyFieldTypeMulti”) #MMS { $TermGUIDs = $SourceItem[$SourceField.InternalName] | ForEach-Object { $_.TermGuid.ToString()} $ItemValue.add($SourceField.InternalName,$TermGUIDs) } Else { #Get Source Field Value and add to Hashtable $ItemValue.add($SourceField.InternalName,$SourceItem[$SourceField.InternalName]) } } } #Copy Created by, Modified by, Created, Modified Metadata values $ItemValue.add(“Created”, $SourceItem[“Created”]); $ItemValue.add(“Modified”, $SourceItem[“Modified”]); $ItemValue.add(“Author”, $SourceItem[“Author”].Email); $ItemValue.add(“Editor”, $SourceItem[“Editor”].Email); Write-Progress -Activity “Copying List Items:” -Status “Copying Item ID ‘$($SourceItem.Id)’ from Source List ($($Counter) of $($SourceListItemsCount))” -PercentComplete (($Counter / $SourceListItemsCount) * 100) #Copy column value from Source to Destination $NewItem = Add-PnPListItem -List $DestinationList -Values $ItemValue #Copy Attachments Copy-SPOAttachments -SourceItem $SourceItem -DestinationItem $NewItem Write-Host “Copied Item ID from Source to Destination List:$($SourceItem.Id) ($($Counter) of $($SourceListItemsCount))” $Counter++ } } Catch { Write-host -f Red “Error:” $_.Exception.Message } } #Set Parameters $SourceSiteURL = “https://[tenantnamehere].sharepoint.com/sites/[sitenamehere]” $SourceListName = “[listnamehere]” $DestinationSiteURL = “https://[tenantnamehere].sharepoint.com/sites/[sitenamehere]” $DestinationListName = “[listnamehere]” #Connect to Source and destination sites $SourceConn = Connect-PnPOnline -Url $SourceSiteURL -Interactive -ReturnConnection $SourceList = Get-PnPList -Identity $SourceListName -Connection $SourceConn $DestinationConn = Connect-PnPOnline -Url $DestinationSiteURL -Interactive -ReturnConnection $DestinationList = Get-PnPList -Identity $DestinationListName -Connection $DestinationConn #Call the Function to Copy List Items between Lists Copy-SPOListItems -SourceList $SourceList -DestinationList $DestinationList
How to Migrate SharePoint List to Another Site Using Excel File Format?
SharePoint list content can be moved to another site by exporting list items to Excel and then importing them back. But it is a cumbersome task if you need to move multiple lists to another site. If you need to transfer a few list items then you can go with the steps below.
- Navigate to the Source SharePoint site and then go to My Lists.
- Open the SharePoint list for copy and hit on Export.
- Choose the Export to Excel option and save it on your computer.
- Now, go to the Destination site and hit on the New option.
- Upload the Excel file and Save the changes.
Conclusion
In this write-up, we have discussed all the methods to migrate SharePoint list to another site. If you are good at technicalities and confident enough to execute the manual methods then you can go with the manual methods. Otherwise, the professional solution is the best one for the list migration from One SharePoint site to another.
Frequently Asked Questions
Q. What’s the process for transferring a SharePoint list to a different location?
A – To transfer a SharePoint list to a different location, you can utilize the “Save as Template” option to export the list as a template file. Following that, you can then generate a new list from that template in the new location.
Q. Do you need to be aware of any restrictions or factors when transferring a SharePoint list to a different location?
A – Yes, there are certain restrictions to keep in mind. If the source and target sites differ in their functionalities or settings, certain adjustments or settings might not work as expected. Additionally, ensure you possess the required access rights to export and import list templates or carry out the transfer of data.
Q. How can I verify that my list was successfully migrated?
A – After migration, check the destination site to ensure all items, columns, and settings match the source list.