Class PivotCalculatedFields
Represents collection of calculated fields in the pivot table.
Implements
System.Collections.Generic.IList<PivotFieldImpl>
System.Collections.Generic.ICollection<PivotFieldImpl>
System.Collections.IList
System.Collections.ICollection
System.Collections.Generic.IReadOnlyList<PivotFieldImpl>
System.Collections.Generic.IReadOnlyCollection<PivotFieldImpl>
System.Collections.Generic.IEnumerable<PivotFieldImpl>
System.Collections.IEnumerable
Inherited Members
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.System.Collections.IList.get_Item(System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.System.Collections.IList.set_Item(System.Int32, System.Object)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.Add(Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.System.Collections.IList.Add(System.Object)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.AddRange(System.Collections.Generic.IEnumerable<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.AsReadOnly()
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.BinarySearch(System.Int32, System.Int32, Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl, System.Collections.Generic.IComparer<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.BinarySearch(Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.BinarySearch(Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl, System.Collections.Generic.IComparer<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.Clear()
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.Contains(Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.System.Collections.IList.Contains(System.Object)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.ConvertAll<TOutput>(System.Converter<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl, TOutput>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.CopyTo(Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl[])
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.CopyTo(System.Int32, Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl[], System.Int32, System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.CopyTo(Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl[], System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.Exists(System.Predicate<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.Find(System.Predicate<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.FindAll(System.Predicate<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.FindIndex(System.Predicate<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.FindIndex(System.Int32, System.Predicate<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.FindIndex(System.Int32, System.Int32, System.Predicate<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.FindLast(System.Predicate<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.FindLastIndex(System.Predicate<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.FindLastIndex(System.Int32, System.Predicate<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.FindLastIndex(System.Int32, System.Int32, System.Predicate<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.ForEach(System.Action<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.GetEnumerator()
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.System.Collections.Generic.IEnumerable<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.GetEnumerator()
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.System.Collections.IEnumerable.GetEnumerator()
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.GetRange(System.Int32, System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.IndexOf(Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.System.Collections.IList.IndexOf(System.Object)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.IndexOf(Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl, System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.IndexOf(Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl, System.Int32, System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.Insert(System.Int32, Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.System.Collections.IList.Insert(System.Int32, System.Object)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.InsertRange(System.Int32, System.Collections.Generic.IEnumerable<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.LastIndexOf(Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.LastIndexOf(Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl, System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.LastIndexOf(Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl, System.Int32, System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.Remove(Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.System.Collections.IList.Remove(System.Object)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.RemoveAll(System.Predicate<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.RemoveAt(System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.RemoveRange(System.Int32, System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.Reverse()
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.Reverse(System.Int32, System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.Sort()
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.Sort(System.Collections.Generic.IComparer<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.Sort(System.Int32, System.Int32, System.Collections.Generic.IComparer<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.Sort(System.Comparison<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.ToArray()
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.TrimExcess()
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.TrueForAll(System.Predicate<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>)
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.Capacity
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.Count
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.System.Collections.IList.IsFixedSize
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.System.Collections.Generic.ICollection<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.IsReadOnly
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.System.Collections.IList.IsReadOnly
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.System.Collections.ICollection.IsSynchronized
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.System.Collections.ICollection.SyncRoot
System.Collections.Generic.List<Syncfusion.XlsIO.Implementation.PivotTables.PivotFieldImpl>.System.Collections.IList.Item[System.Int32]
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Syncfusion.XlsIO.Implementation.PivotTables
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
public class PivotCalculatedFields : List<PivotFieldImpl>, IList<PivotFieldImpl>, ICollection<PivotFieldImpl>, IList, ICollection, IReadOnlyList<PivotFieldImpl>, IReadOnlyCollection<PivotFieldImpl>, IEnumerable<PivotFieldImpl>, IEnumerable, IPivotCalculatedFields
Constructors
PivotCalculatedFields(PivotTableImpl)
Initializes a new instance of pivot calculated fields collection with the specified pivot table.
Declaration
public PivotCalculatedFields(PivotTableImpl pivotTable)
Parameters
Type | Name | Description |
---|---|---|
PivotTableImpl | pivotTable | Pivot table from which the calculated fields are extracted. |
Properties
Item[Int32]
Gets a pivot field with the specified index from the collection. Read-only.
Declaration
public IPivotField this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Zero-based index of the item to get. |
Property Value
Type | Description |
---|---|
IPivotField |
Explicit Interface Implementations
IPivotCalculatedFields.Add(String, String)
Adds calculated field to the pivot table based on the specified formula.
Declaration
IPivotField IPivotCalculatedFields.Add(string name, string formula)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Represents the name of the calculated pivot field. |
System.String | formula | Represents the formula of the calculated pivot field. |
Returns
Type | Description |
---|---|
IPivotField | Returns the calculated pivot field. |
Examples
Following code snippet illustrates how to add a pivot calculated field to the pivot table.
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];
// Create Pivot cache with the given data range
IPivotCache cache = workbook.PivotCaches.Add(worksheet["A1:H50"]);
//Create "PivotTable1" with the cache at the specified range
IPivotTable pivotTable = worksheet.PivotTables.Add("PivotTable1", worksheet["A1"], cache);
//Add Pivot table fields (Row and Column fields)
pivotTable.Fields[2].Axis = PivotAxisTypes.Row;
pivotTable.Fields[6].Axis = PivotAxisTypes.Row;
pivotTable.Fields[3].Axis = PivotAxisTypes.Column;
//Add data field
IPivotField field = pivotTable.Fields[5];
pivotTable.DataFields.Add(field, "Sum", PivotSubtotalTypes.Sum);
IPivotCalculatedFields.get_Item(String)
Declaration
IPivotField IPivotCalculatedFields.get_Item(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Returns
Type | Description |
---|---|
IPivotField |
IPivotCalculatedFields.Item[String]
Gets a pivot field with the specified name from the collection. Read-only.
Declaration
IPivotField IPivotCalculatedFields.this[] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Calculated Field Name |
Returns
Type | Description |
---|---|
IPivotField |
Implements
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.IList
System.Collections.ICollection
System.Collections.Generic.IReadOnlyList<T>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable