Used to drive the Export-MultipleExcelSheets

This commit is contained in:
dfinke
2020-05-23 17:32:03 -04:00
parent 070d40b5af
commit a5a98d5c92

View File

@@ -0,0 +1,17 @@
. "$PSScriptRoot\Export-MultipleExcelSheets.ps1"
$xlfile = "$env:TEMP\test.xlsx"
Remove-Item $xlfile -ErrorAction SilentlyContinue
$p = Get-Process
$InfoMap = @{
PM = { $p | Select-Object company, pm }
Handles = { $p | Select-Object company, handles }
Services = { Get-Service }
Files = { Get-ChildItem -File }
Albums = { ConvertFrom-Csv (Invoke-RestMethod https://raw.githubusercontent.com/dfinke/powershell-for-developers/master/chapter05/BeaverMusic/BeaverMusic.UI.Shell/albums.csv) }
WillNotGetExported = "Hello World"
}
Export-MultipleExcelSheets -Path $xlfile -InfoMap $InfoMap -Show -AutoSize