mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Used to drive the Export-MultipleExcelSheets
This commit is contained in:
17
Examples/Experimental/tryExportMultipleExcelSheets.ps1
Normal file
17
Examples/Experimental/tryExportMultipleExcelSheets.ps1
Normal 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
|
||||
Reference in New Issue
Block a user