Overview
You are curious on how to generate an excel of all your current documents in one massive list.
Solution
There is no function built into Bonzai that will allow you to export a list of all current documents on a site. You may be able to use the "Export to Excel'' button to export some of the data.
A Datasheet View is helpful if you want to export your data to a spreadsheet or a database program.
You may be able to connect directly to SharePoint using Excel. In Excel go to the Data tab and click Get Data, then select From Online Services, and From SharePoint Online List.
If none of the above options will work, you can run a SharePoint PowerShell script to export a list of documents to a CSV file.
function Get-Documents ()
{
Add-PSSnapin Microsoft.SharePoint.PowerShell
$web = get-spweb (Read-Host "Enter Site URL")
foreach ($list in $web.Lists)
{
if ($list.BaseType -eq "DocumentLibrary")
{
foreach ($item in $list.Items)
{
$data = @{
"Web" = $web.Url
"list" = $list.Title
"Item ID" = $item.ID
"Item URL" = $item.Url
"Item Title" = $item.Title
"Item Name" = $item.Name
"Item Created" = $item["Created"]
"Item Modified" = $item["Modified"]
"File Size" = $item.File.Length/1KB
}
New-Object PSObject -Property $data
}
}
$web.Dispose();
}
}
Get-Documents | Out-GridView
#Get-Documents | Export-Csv -NoTypeInformation -Path c:\temp\inventory.csv
Priyanka Bhotika
Comments