I come from sharepoint 2019 and i try to import data from excel to a list It's working fine for date and text datas But i don't understand about unique choice, checkbox or People picker fields.
my loop to add rows is
Foreach ($Row in $ExcelData)
{
Write-host -f Yellow "Adding Row $i of $($ExcelData.count)..." -NoNewline
#Add to SharePoint Online List
$ListItemInfo = New-Object Microsoft.SharePoint.Client.ListItemCreationInformation
$ListItem = $List.AddItem($ListItemInfo)
#Text
#$ListItem["Number"] = $Row.'num'
#date
#$ListItem["Birthday"] = $Row.'Date de naissance '
#Multiple Choice (checkbox)
#$ListItem["Type"] = $Row.'Categorie'
#Unique Choice
#$ListItem["Ready"] = $Row.'Validation'
#People Picker Field
#$ListItem["Usr"] = $Row.'User'
$ListItem.Update()
}
Someone could have a look on this please, and tell me what is wrong ? or maybe provide me another way ?
Regards,
Poule
