mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-10 05:13:49 +00:00
Experiment multiple pivot tables
This commit is contained in:
22
Examples/TryMultiplePivotTables.ps1
Normal file
22
Examples/TryMultiplePivotTables.ps1
Normal 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
|
||||
Reference in New Issue
Block a user