[]
Specifies whether item labels are repeated in a PivotTable report.
Use this enum with RepeatAllLabels(PivotFieldRepeatLabels) to control whether repeated row field items are displayed on each row or shown only once.
public enum PivotFieldRepeatLabels
Public Enum PivotFieldRepeatLabels
worksheet.Range["A1:C5"].Value = new object[,] {
{"Category", "Product", "Amount"},
{"Beverages", "Tea", 100},
{"Beverages", "Coffee", 200},
{"Snacks", "Chips", 150},
{"Snacks", "Nuts", 120}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:C5"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["E1"], "SalesPivot");
pivotTable.RepeatAllLabels(PivotFieldRepeatLabels.RepeatLabels);
| Name | Description |
|---|---|
| DoNotRepeatLabels | Do not repeat item labels. |
| RepeatLabels | Repeat all item labels. |