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