From 28129172281011ea141f67f4713319bb8a0f2c8a Mon Sep 17 00:00:00 2001 From: dfinke Date: Sun, 24 Jun 2018 09:32:22 -0400 Subject: [PATCH] Demos the -PivotTableName param. Let's you name the sheet that the pivot table is created on --- Examples/PivotTable/PivotTableWithName.ps1 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Examples/PivotTable/PivotTableWithName.ps1 diff --git a/Examples/PivotTable/PivotTableWithName.ps1 b/Examples/PivotTable/PivotTableWithName.ps1 new file mode 100644 index 0000000..489fcac --- /dev/null +++ b/Examples/PivotTable/PivotTableWithName.ps1 @@ -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 \ No newline at end of file