mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Supports excluding Row Grand Totals
This commit is contained in:
@@ -398,7 +398,8 @@
|
|||||||
[Parameter(ParameterSetName = 'Now')]
|
[Parameter(ParameterSetName = 'Now')]
|
||||||
# [Parameter(ParameterSetName = 'TableNow')]
|
# [Parameter(ParameterSetName = 'TableNow')]
|
||||||
[Switch]$Now,
|
[Switch]$Now,
|
||||||
[Switch]$ReturnRange
|
[Switch]$ReturnRange,
|
||||||
|
[Switch]$NoTotalsInPivot
|
||||||
)
|
)
|
||||||
|
|
||||||
Begin {
|
Begin {
|
||||||
@@ -784,6 +785,10 @@
|
|||||||
if ($item.value.ChartTitle) {$chart.Title.Text = $item.value.chartTitle}
|
if ($item.value.ChartTitle) {$chart.Title.Text = $item.value.chartTitle}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($item.Value.NoTotalsInPivot) {
|
||||||
|
$pivotTable.RowGrandTotals = $false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -829,6 +834,10 @@
|
|||||||
$pivotTable.DataOnRows = $false
|
$pivotTable.DataOnRows = $false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($NoTotalsInPivot) {
|
||||||
|
$pivotTable.RowGrandTotals = $false
|
||||||
|
}
|
||||||
|
|
||||||
if ($IncludePivotChart) {
|
if ($IncludePivotChart) {
|
||||||
$chart = $wsPivot.Drawings.AddChart('PivotChart', $ChartType, $pivotTable)
|
$chart = $wsPivot.Drawings.AddChart('PivotChart', $ChartType, $pivotTable)
|
||||||
@@ -1007,7 +1016,8 @@ function New-PivotTableDefinition {
|
|||||||
[Switch]$NoLegend,
|
[Switch]$NoLegend,
|
||||||
[Switch]$ShowCategory,
|
[Switch]$ShowCategory,
|
||||||
[Switch]$ShowPercent,
|
[Switch]$ShowPercent,
|
||||||
[String]$ChartTitle
|
[String]$ChartTitle,
|
||||||
|
[Switch]$NoTotalsInPivot
|
||||||
)
|
)
|
||||||
|
|
||||||
$parameters = @{} + $PSBoundParameters
|
$parameters = @{} + $PSBoundParameters
|
||||||
|
|||||||
Reference in New Issue
Block a user