mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-29 06:33:16 +00:00
17 lines
689 B
PowerShell
17 lines
689 B
PowerShell
. "$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 |