PivotTable Options Display as classic PivotTable Layout and Field Settings as Repeat item labels
I have to create a workbook with 2 sheets. 1 for raw and the other 1 for summary. Basically the data I have is:

This data came from SQL and I was able to export it to excel.
But my second challenge is how to create a summary in another worksheet. something like this:

Main objective is to tweak the Pivot table option like this.

Then remove the totals per row. To have the same output as the fig 2. But can we do it as automated as I will do the automated email sending after this.
Not sure I know how to get a pivot table in that shape. Pivot tables are hierarchical.

Thanks for the workbook. This is a new one on me. Don't know how to manually shape the pivot table the way you did. Here's mine.
@jhoneill Do you know how to shape the pivot table that way?
I can get roughly the same like this
$excel = $data | export-excel -path $env:temp\temp.xlsx -PassThru
$pivot = Add-PivotTable -PivotTableName foo -ExcelPackage $excel -SourceWorkSheet sheet1 -PivotRows "Company Name", "CompanyID", "Country" -PivotData @{sales="Sum"} -NoTotalsInPivot -PassThru
$pivot.RowFields[0].SubTotalFunctions="None"
$pivot.RowFields[1].SubTotalFunctions="None"
$pivot.RowFields[2].SubTotalFunctions="None"
$pivot.RowFields[0].Compact = $false
$pivot.RowFields[1].Compact = $false
$pivot.RowFields[2].Compact = $false
$pivot.RowFields[0].Outline = $false
$pivot.RowFields[1].Outline = $false
$pivot.RowFields[2].Outline = $false
$pivot.EnableDrill = $false
$pivot.ShowDrill = $false
I have to manually turn on "repeat label items" because that is not settable by EPPLus, and I can't set the column headings to be other than row labels and total
Thanks @jhoneill, need to explore field settings. Too bad EPPlus doesn't support it.
@dfinke I found a work around for this. I used t-sql to do the data pivot for me. However if you find this issue worth looking into I'll be glad if I can be of any assistance.
Thank you for this wonderful PS module. More power to you!