Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, November 17, 2014 11:52 AM
We have an requirement to export the items to Excel of more than 5000 items. can someone help me on this ?
Cheers, San
All replies (2)
Monday, November 17, 2014 12:23 PM ✅Answered
Hi,
Please use the PowerShell Script to export your data to CSV.
You can open the CSV in excel and can be renamed to excel format later.
$MyWeb = Get-SPWeb "http://sitename"
$MyList = $MyWeb.Lists["ListName"]
$exportlist = @()$Mylist.EnableThrottling = $false$Mylist.Update()
$Mylist.Items | foreach {
$obj = New-Object PSObject -Property @{
“Column1” = $_["Column Name in SharePoint"]
"Column2" = $_["Column Name in SharePoint"]
}
$exportlist += $obj
$exportlist | Export-Csv -path 'C:\FilePath\Filename.csv'
} $Mylist.EnableThrottling = $true$Mylist.Update()
Please don't forget to mark it answered, if your problem resolved or helpful.
Monday, November 17, 2014 12:33 PM
List threshold defines how many number of maximum rows you can have for a single list view. We do have an option of changing default list view threshold value for entire web application through central admin, this will affect all the sites within the given web application and is not a good practice.
Another way is to disable the list threshold setting for a specific list instance through powershell script. Please look at Disable Threshold for List
This will allow your list to create views with over 5000 records. It might be possible that you had it disabled for your previous list instance and thats how you were able to get more then 5000 records.
If this helped you resolve your issue, please mark it Answered. You can reach me through http://itfreesupport.com/