This commit is contained in:
dfinke
2017-10-13 09:17:51 -04:00
parent 48607e403e
commit ceb986b408

View File

@@ -0,0 +1,19 @@
$file="C:\Temp\test.xlsx"
rm $file -ErrorAction Ignore -Force
$ptd = @{}
$base=@{
SourceWorkSheet='gsv'
PivotData= @{'Status'='count'}
IncludePivotChart=$true
ChartType='BarClustered3D'
}
$ptd.gpt1 = $base + @{ PivotRows = "ServiceType" }
$ptd.gpt2 = $base + @{ PivotRows = "Status" }
$ptd.gpt3 = $base + @{ PivotRows = "StartType" }
$ptd.gpt4 = $base + @{ PivotRows = "CanStop" }
gsv | Export-Excel -path $file -WorkSheetname gsv -Show -PivotTableDefinition $ptd