mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Demos the -PivotTableName param. Let's you name the sheet that the pivot table is created on
This commit is contained in:
16
Examples/PivotTable/PivotTableWithName.ps1
Normal file
16
Examples/PivotTable/PivotTableWithName.ps1
Normal 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
|
||||
Reference in New Issue
Block a user