Experiment multiple pivot tables

This commit is contained in:
dfinke
2017-10-11 19:23:45 -04:00
parent 85151f8375
commit f5acf88a17
2 changed files with 81 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
ipmo .\ImportExcel.psd1 -Force
$file = "c:\temp\testPT.xlsx"
rm $file -ErrorAction Ignore
$pt=[ordered]@{}
$pt.PT1=@{
PivotRows = "Status"
PivotData= @{'Status'='count'}
IncludePivotChart=$true
}
$pt.PT2=@{
PivotRows = "StartType"
PivotData= @{'StartType'='count'}
IncludePivotChart=$true
}
$data = gsv | select status, Name, displayName, starttype
$data | Export-Excel -Path $file -Show -PivotTable $pt -AutoSize