2

I have done a excel import and all the columns are successfully imported. One of the field is Assigned to whose data type is Single Line of Text.

Is there a way to change the data type of this field to People or group after the excel import (i.e after the field has already been created).

I saw some posts saying that it is not possible in SharePoint 2007. Just in case if it is available in SharePoint 2013.

  • 1
    I think the easiest is to create a new People/Group field then open the list in DataSheet view and copy/paste the column. You have to manually delete every single entry that have no matching account – Danny '365CSI' Engelman Oct 13 '15 at 15:35
4

No it is still not available. You will need to create a new column as a person/group field and then in Quick Edit view, copy over the data. Then delete your single line of text column.

1

you can run a PowerShell or have your admin run it (like I did) to update an empty person or group column you create. This is worth it with large lists. Just update the column names to match your list.

 #Add-PSSnapin Microsoft.SharePoint.Powershell
$url = "http://SiteName"
$listName = "ListName"

$Source1ColumnName = "Modified By1"
$Dest1ColumnName = "ModBy"
$Source2ColumnName = "Delegate To"
$Dest2ColumnName = "DelegatedTo"

# Get Current Date Time
function Get-TimeStamp {
    return "[{0:MM/dd/yy} {0:HH:mm:ss}]" -f (Get-Date)
}

# Get Site Collection Details
$web = Get-SPWeb $url
# Get List Details
$list = $web.Lists[$listName]

# Temporary allow Unsafe updates 
$web.AllowUnsafeUpdates = $true

# Output Current Date Time
Write-Host "Started - $(Get-TimeStamp)"

# Loop through each item in list and set column data
foreach ($item in $list.Items) {
    try {
        $SourceValue = $item[$Source1ColumnName]
        $SourceValue2 = $item[$Source2ColumnName]

        If ($SourceValue) {
            [Microsoft.SharePoint.SPUser]$spuser = $Web.EnsureUser($SourceValue)
            $item[$Dest1ColumnName] = $spuser
        }
        If ($SourceValue2) { 
            [Microsoft.SharePoint.SPUser]$spuser2 = $Web.EnsureUser($SourceValue2)
            $item[$Dest2ColumnName] = $spuser2 
        }
        $item.Update()
    }
    catch {
        Write-Warning $_
    }
}
# Output Current Date Time
Write-Host "Ended - $(Get-TimeStamp)"

# Reset Unsafe updates 
$web.AllowUnsafeUpdates = $false

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.