[]
Serializable, Comparable<PivotFieldRepeatLabels>, ConstableUse this enum with IPivotTable.repeatAllLabels(PivotFieldRepeatLabels) to control whether repeated row field items are displayed on each row or shown only once.
worksheet.getRange("A1:C5").setValue(new Object[][] {
{"Category", "Product", "Amount"},
{"Beverages", "Tea", 100},
{"Beverages", "Coffee", 200},
{"Snacks", "Chips", 150},
{"Snacks", "Nuts", 120}
});
IPivotCache pivotCache = workbook.getPivotCaches().create(worksheet.getRange("A1:C5"));
IPivotTable pivotTable = worksheet.getPivotTables().add(pivotCache, worksheet.getRange("E1"), "SalesPivot");
pivotTable.repeatAllLabels(PivotFieldRepeatLabels.RepeatLabels);
Enum.EnumDesc<E extends Enum<E>>static PivotFieldRepeatLabelsstatic PivotFieldRepeatLabels[]values()name - the name of the enum constant to be returned.IllegalArgumentException - if this enum class has no constant with the specified nameNullPointerException - if the argument is null