[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IPivotTable.CompactRowIndent

CompactRowIndent Property

CompactRowIndent

Gets or sets the indent increment for PivotItems when compact row layout is enabled.

This value controls how much each nested PivotItem is indented when the PivotTable uses compact row layout.

Declaration
int CompactRowIndent { get; set; }
Property CompactRowIndent As Integer
Examples
worksheet.Range["A1:B5"].Value = new object[,] {
    {"Category", "Amount"},
    {"Fruit", 120},
    {"Fruit", 80},
    {"Vegetables", 95},
    {"Vegetables", 60}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B5"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "SalesPivot");
pivotTable.PivotFields["Category"].Orientation = PivotFieldOrientation.RowField;
pivotTable.CompactRowIndent = 2;
int indent = pivotTable.CompactRowIndent;