[]
Specifies the type of calculation in the totals row of a table column.
Use this enumeration with TotalsCalculation to control how the totals cell is calculated for a table column, such as summing numeric values, counting cells, or returning the minimum or maximum value.
public enum TotalsCalculation
Public Enum TotalsCalculation
worksheet.Range["A1:B3"].Value = new object[,] {
{"Product", "Amount"},
{"Apple", 100},
{"Pear", 200}
});
ITable table = worksheet.Tables.Add(worksheet.Range["A1:B3"], true);
table.ShowTotals = true;
table.Columns[1].TotalsCalculation = TotalsCalculation.Sum;
| Name | Description |
|---|---|
| Average | Specifies average. |
| Count | Specifies the number of non-empty cells. |
| CountNums | Specifies the number of cells with numeric values. |
| Custom | Specifies a custom calculation. |
| Max | Specifies the maximum value. |
| Min | Specifies the minimum value. |
| None | Specifies no calculation. |
| StdDev | Specifies the standard deviation. |
| Sum | Specifies the sum. |
| Var | Specifies variance. |