mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Update MultiplePivotTables.ps1
This commit is contained in:
@@ -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"]
|
||||
@@ -59,4 +55,4 @@ $pt.RowHeaderCaption ="By Years,Region"
|
||||
|
||||
Set-ExcelColumn -Worksheet $excel.Sheet1 -Column 2 -AutoSize
|
||||
|
||||
Close-ExcelPackage $excel -Show
|
||||
Close-ExcelPackage $excel -Show
|
||||
|
||||
Reference in New Issue
Block a user