[]
Gets or sets whether a blank row is inserted after this row field in a PivotTable report.
This property applies to PivotFields placed in the row area of a PivotTable. The default value is false.
bool LayoutBlankLine { get; set; }
Property LayoutBlankLine As Boolean
worksheet.Range["A1:B4"].Value = new object[,] {
{"Product", "Amount"},
{"Apple", 100},
{"Apple", 200},
{"Banana", 150}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"]);
IPivotField field = pivotTable.PivotFields["Product"];
field.Orientation = PivotFieldOrientation.RowField;
field.LayoutBlankLine = true;
bool blankLine = field.LayoutBlankLine;