[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.PivotFieldRepeatLabels

PivotFieldRepeatLabels Enum

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.

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public enum PivotFieldRepeatLabels
Public Enum PivotFieldRepeatLabels
Examples
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);

Fields

Name Description
DoNotRepeatLabels

Do not repeat item labels.

RepeatLabels

Repeat all item labels.