Worksheet.ConsolidationFunction Property (2007 System)
Visual Studio 2008
Gets the function code used for the current consolidation.
Assembly: Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)
The following code example uses the ConsolidationFunction property to determine which function is used by the worksheet for consolidation.
This example is for a document-level customization.
private void ShowConsolidationFunction() { string simpleName; switch (this.ConsolidationFunction) { case Excel.XlConsolidationFunction.xlSum: simpleName = "Sum()"; break; case Excel.XlConsolidationFunction.xlMax: simpleName = "Max()"; break; case Excel.XlConsolidationFunction.xlProduct: simpleName = "Product()"; break; default: simpleName = "Other"; break; } MessageBox.Show("This worksheet uses " + simpleName + " for the consolidation function."); }
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.