[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IPivotTable.PivotColumnAxis

PivotColumnAxis Property

PivotColumnAxis

Gets the IPivotAxis object that represents the entire column axis of the PivotTable report.

Use this axis to work with the column-side structure of a PivotTable, such as the pivot lines displayed across the top of the report.

Declaration
IPivotAxis PivotColumnAxis { get; }
ReadOnly Property PivotColumnAxis As IPivotAxis
Examples
worksheet.Range["A1:C5"].Value = new object[,] {
    {"Category", "Region", "Amount"},
    {"Beverages", "East", 120},
    {"Beverages", "West", 80},
    {"Snacks", "East", 95},
    {"Snacks", "West", 110}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:C5"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["E1"], "SalesPivot");
pivotTable.PivotFields["Category"].Orientation = PivotFieldOrientation.ColumnField;
IPivotAxis columnAxis = pivotTable.PivotColumnAxis;
IPivotLines lines = columnAxis.PivotLines;