Demos the -PivotTableName param. Let's you name the sheet that the pivot table is created on

This commit is contained in:
dfinke
2018-06-24 09:32:22 -04:00
parent 8052b56387
commit 2812917228

View File

@@ -0,0 +1,16 @@
Import-Module ..\..\ImportExcel.psd1 -Force
Remove-Item .\test1.xlsx -ErrorAction Ignore
$ExcelParams = @{
Path = ".\test1.xlsx"
IncludePivotTable = $true
PivotRows = 'Company'
PivotTableName = 'MyTable'
PivotData = @{'Handles' = 'sum'}
Show = $true
}
Get-Process | Select-Object Company, Handles |
Export-Excel @ExcelParams