Transfer Sharepoint List Contents to Excel

Bob Wilson 1 Reputation point


So I have certain items on a SharePoint List and I would like to transfer the contents of each item to Excel. I’m not talking about the items that I can see once I click on the list but rather the contents of each list item, because each individual item has contents of its own.

Thank you

A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,073 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Echo Du_MSFT 17,126 Reputation points

    Hello @Bob Wilson ,

    Welcome to Q&A Forum!

    Please following steps:

    1.If in the current view not set any filter, in other words you can view all items in the list. You can click on Export >> Export to Excel in the top menu bar



    2.Please run the below powershell script as an admin to export all list items to CSV

    $SiteURL = ""  
    $ListName = "listname"  
    $CSVPath = "C:\temp\ListData.csv"  
    $ListDataCollection= @()  
    #Connect to PnP Online  
    Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential)  
    $Counter = 0  
    $ListItems = Get-PnPListItem -List $ListName -PageSize 2000  
    #Get all items from list  
    $ListItems | ForEach-Object {  
            $ListItem  = Get-PnPProperty -ClientObject $_ -Property FieldValuesAsText  
            $ListRow = New-Object PSObject  
            Get-PnPField -List $ListName | ForEach-Object {  
                $ListRow | Add-Member -MemberType NoteProperty -name $_.InternalName -Value $ListItem[$_.InternalName]  
            Write-Progress -PercentComplete ($Counter / $($ListItems.Count)  * 100) -Activity "Exporting List Items..." -Status  "Exporting Item $Counter of $($ListItems.Count)"  
            $ListDataCollection += $ListRow  
    #Export the result Array to CSV file  
    $ListDataCollection | Export-CSV $CSVPath -NoTypeInformation  



    Echo Du


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.