Table of Contents

TTokenFunction Class

A function like "Sum" or "If". Note that this token doesn't have arguments. The arguments are stored in the TTokenList that contains this token, in the order they appear in the formula. So, for example, the formula "=Sum(A1,B2)" would return the following token list:

1. TTokenCellAddress with Address = A1, 2. TTokenCellAddress with Address = B2, 3. TTokenFunction with FunctionName = "Sum" and ArgumentCount = 2

The first token is the first argument, the second token is the second argument, and the third token is the function itself. In many cases, arguments will appear as if they were reversed: If you follow the TokenList above in reverse order, you will reconstruct the text "=Sum(B2,A1)" instead of =Sum(A1, B2). So you need to be careful, because the first argument of the function is the one more far away from the FunctionToken.

Syntax

Namespace: FlexCel.Core

public class TTokenFunction: TToken

Constructors

Properties

Name Description
FunctionName Name of the function represented by this token.
ArgumentCount Number of arguments for this function. Note that if the function has a fixed number of arguments, this parameter is ignored.
IsUserDefined If true, the function is used defined, not built-in in Excel. Note that some built-in functions from Excel 2003 like EOMonth, while available in Excel, are implemented as user-defined functions (they were available in ToolPacks like the Analysis ToolPack).