Update MultiplePivotTables.ps1

This commit is contained in:
Doug Finke
2018-12-20 09:01:21 -05:00
committed by GitHub
parent f3dc390bfa
commit 894e645a47

View File

@@ -1,5 +1,3 @@
cls
$data = ConvertFrom-Csv @"
Region,Date,Fruit,Sold
North,1/1/2017,Pears,50
@@ -32,8 +30,6 @@ $pivotTableParams = @{
$pt = Add-PivotTable @pivotTableParams -PassThru
#$pt.RowHeaderCaption ="By Region,Fruit,Date"
$pt.RowHeaderCaption = "By " + ($pivotTableParams.PivotRows -join ",")
#$pt.ColumnHeaderCaption = "By " + ($pivotTableParams.PivotRows -join ",")
#$pt.FieldPrintTitles = "By " + ($pivotTableParams.PivotRows -join ",")
$pivotTableParams.PivotTableName="ByFruit"
$pivotTableParams.Address = $excel.Sheet1.cells["J1"]