[]
Gets the default row layout type that is applied when PivotFields are added to the PivotTable for the first time.
This setting determines the initial row layout used for newly added PivotFields, such as compact, outline, or tabular layout.
LayoutRowType LayoutRowDefault { get; set; }
Property LayoutRowDefault As LayoutRowType
worksheet.Range["A1:C4"].Value = new object[,] {
{"Region", "Product", "Amount"},
{"East", "Apple", 120},
{"West", "Apple", 80},
{"East", "Orange", 90}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:C4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["E1"], "SalesPivot");
pivotTable.LayoutRowDefault = LayoutRowType.TabularRow;
LayoutRowType layoutType = pivotTable.LayoutRowDefault;