[]
Gets or sets whether item labels are repeated in the PivotTable for the specified IPivotField.
Use this property to determine whether repeated item labels are shown for the field in the PivotTable layout.
bool RepeatLabels { get; set; }
Property RepeatLabels As Boolean
worksheet.Range["A1:B4"].Value = new object[,] {
{"Category", "Product"},
{"Fruit", "Apple"},
{"Fruit", "Orange"},
{"Drink", "Tea"}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"]);
IPivotField field = pivotTable.PivotFields["Category"];
field.Orientation = PivotFieldOrientation.RowField;
field.RepeatLabels = true;
bool repeatLabels = field.RepeatLabels;