Merge pull request #91 from pauldalewilliams/master

Adds switch for PivotDataToColumn
This commit is contained in:
Doug Finke
2016-04-18 18:27:57 -04:00

View File

@@ -27,6 +27,7 @@ function Export-Excel {
[string[]]$PivotRows, [string[]]$PivotRows,
[string[]]$PivotColumns, [string[]]$PivotColumns,
$PivotData, $PivotData,
[Switch]$PivotDataToColumn,
[string]$Password, [string]$Password,
[OfficeOpenXml.Drawing.Chart.eChartType]$ChartType="Pie", [OfficeOpenXml.Drawing.Chart.eChartType]$ChartType="Pie",
[Switch]$IncludePivotTable, [Switch]$IncludePivotTable,
@@ -292,6 +293,9 @@ function Export-Excel {
$df.Function = 'Count' $df.Function = 'Count'
} }
} }
if($PivotDataToColumn) {
$pivotTable.DataOnRows = $false
}
} }
if($IncludePivotChart) { if($IncludePivotChart) {