mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
added
This commit is contained in:
19
Examples/TryMultiplePivotTablesFromOneSheet.ps1
Normal file
19
Examples/TryMultiplePivotTablesFromOneSheet.ps1
Normal 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
|
||||
Reference in New Issue
Block a user