mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
updated
This commit is contained in:
@@ -1,19 +1,26 @@
|
||||
$file="C:\Temp\test.xlsx"
|
||||
Import-Module ..\ImportExcel.psd1 -Force
|
||||
|
||||
rm $file -ErrorAction Ignore -Force
|
||||
$file = "C:\Temp\test.xlsx"
|
||||
|
||||
Remove-Item $file -ErrorAction Ignore -Force
|
||||
|
||||
$ptd = @{}
|
||||
$base=@{
|
||||
SourceWorkSheet='gsv'
|
||||
PivotData= @{'Status'='count'}
|
||||
IncludePivotChart=$true
|
||||
ChartType='BarClustered3D'
|
||||
$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" }
|
||||
$ptd = [ordered]@{}
|
||||
|
||||
gsv | Export-Excel -path $file -WorkSheetname gsv -Show -PivotTableDefinition $ptd
|
||||
# $ptd.gpt1 = $base + @{ PivotRows = "ServiceType" }
|
||||
# $ptd.gpt2 = $base + @{ PivotRows = "Status" }
|
||||
# $ptd.gpt3 = $base + @{ PivotRows = "StartType" }
|
||||
# $ptd.gpt4 = $base + @{ PivotRows = "CanStop" }
|
||||
|
||||
$ptd += New-PivotTableDefinition @base servicetype -PivotRows servicetype -ChartType Area3D
|
||||
$ptd += New-PivotTableDefinition @base status -PivotRows status -ChartType PieExploded3D
|
||||
$ptd += New-PivotTableDefinition @base starttype -PivotRows starttype -ChartType BarClustered3D
|
||||
$ptd += New-PivotTableDefinition @base canstop -PivotRows canstop -ChartType ConeColStacked
|
||||
|
||||
Get-Service | Export-Excel -path $file -WorkSheetname gsv -Show -PivotTableDefinition $ptd
|
||||
Reference in New Issue
Block a user