How to: Change the PivotTable Layout
- 3 minutes to read
The table below describes the available report layouts and lists additional options that can be set for each layout form.
Additional Layout Options
This is the default layout for a newly created PivotTable report. This layout enables you to keep your report as narrow as possible.
It displays items from different row fields in a single column and subsidiary row field items are shown indented to the left.
This layout displays each row field in its own column. Subsidiary row field items begin one row below the parent field item.
This layout displays each row field in its own column. Subsidiary row field items begin on the same row.
Subtotals for items in the outer row fields are always shown at the bottom.
The following code example shows how to change the default PivotTable layout to outline form.
Worksheet worksheet = workbook.Worksheets["Report1"]; workbook.Worksheets.ActiveWorksheet = worksheet; // Access the pivot table by its name in the collection. PivotTable pivotTable = worksheet.PivotTables["PivotTable1"]; // Display the pivot table in the outline form. pivotTable.Layout.SetReportLayout(PivotReportLayout.Outline);