Advertisement
In this article we can able to see how to import values from
Excel to SharePoint List.
In our scenario we are having a list “VirtoSoftware ” having
a TOP 5 Third party we parts(VitroSoftware is a company
they design and builds innovate we parts for Microsoft SharePoint) instead of entering manually using Power Shell
we can do it easily.
This is the Excel and the list, Excel having the Information
but list is having no items.
Now I am running the below PowerShell Script as show below.
Add-PSSnapin microsoft.sharepoint.powershell
$excelinfo = Import-Csv -Path
"D:\VirtoSoftware.csv" -Header("Title")
$web = Get-SPWeb
http://virtosoftware.com/sites/topwebparts
$list = $web.Lists["virtosoftware"] write-host
$list
foreach ($row in $excelinfo) {
if($row.Title -ne
"" -and $row.Title -ne $null)
{
$item =
$list.Items.Add();
$item["Title"]
= $row.Title;
$item.Update();
}
}
Once it’s completed
finally we can see the OUTPUT


E6F7446C
ReplyDeleteCizre
Erdemli
Canik
Menemen
Hopa
Gümbet
Bodrum
Güllük
Akhisar
8222DC7C
ReplyDeleteBitez
Adalar
Ergani
Akyurt
Mudanya
Boyabat
Bandırma
Bafra
Canik