[]
Gets the number of pivot fields in this collection.
This property returns the total number of IPivotField objects available in the PivotTable field collection.
int Count { get; }
ReadOnly Property Count As Integer
worksheet.Range["A1:C4"].Value = new object[,] {
{"Region", "Product", "Amount"},
{"East", "Apple", 120},
{"West", "Orange", 80},
{"East", "Orange", 90}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:C4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["E1"], "SalesPivot");
int count = pivotTable.PivotFields.Count;