[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IPivotLine.LineType

LineType Property

LineType

Gets the type of this PivotLine.

Declaration
PivotLineType LineType { get; }
ReadOnly Property LineType As PivotLineType
Examples
worksheet.Range["A1:C4"].Value = new object[,] {
    {"Category", "Product", "Amount"},
    {"Fruit", "Apple", 100},
    {"Fruit", "Pear", 80},
    {"Drink", "Tea", 60}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:C4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["E1"], "Sales");
pivotTable.PivotFields["Category"].Orientation = PivotFieldOrientation.RowField;
pivotTable.PivotFields["Amount"].Orientation = PivotFieldOrientation.DataField;
IPivotLine pivotLine = pivotTable.PivotRowAxis.PivotLines[0];
PivotLineType lineType = pivotLine.LineType;