[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.SubtotalLocationType

SubtotalLocationType Enum

Specifies where subtotals are displayed in a PivotTable report.

Use Top to place subtotals above the related field items, or Bottom to place them below the related field items. When used with SubtotalLocation(SubtotalLocationType), Bottom is required if the PivotTable row layout is TabularRow.

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public enum SubtotalLocationType
Public Enum SubtotalLocationType
Examples
worksheet.Range["A1:B5"].Value = new object[,] {
    {"Product", "Amount"},
    {"A", 100},
    {"A", 200},
    {"B", 300},
    {"B", 400}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B5"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "PivotTable1");
pivotTable.PivotFields["Product"].Orientation = PivotFieldOrientation.RowField;
pivotTable.SubtotalLocation(SubtotalLocationType.Top);

Fields

Name Description
Bottom

Specifies that subtotals are displayed below the related PivotTable field items.

Top

Specifies that subtotals are displayed above the associated detail rows.