AddCustomFunction Method
Applies To
fpSpread control
Description
Defines a custom function, which can be used in a formula definition.
Syntax
BOOL CSpreadSheet::AddCustomFunction(LPCTSTR FunctionName, short ParameterCnt);
fpSpread.AddCustomFunction(ByVal FunctionName As String, ByVal ParameterCnt As Integer) As Boolean
Parameters
The following parameters are available:
Parameter | Description |
---|---|
FunctionName | Name of the custom function |
ParameterCnt | Number of parameters the function expects (Set this value to –1 if any number of parameters are allowed.) |
Remarks
An application must respond to the CustomFunction event to implement the custom function.
This method is applied to the entire workbook, including all sheets in the control.
Spread Designer
The Custom Name tab in the Calculation dialog box.
Parameter | Items on Custom Name tab |
---|---|
FunctionName | Name drop-down combo box |
ParameterCnt | Value box |
Return Type
True if successful; otherwise, False.
See Also
Creating and Using Custom Functions
CustomFunction event
AddCustomFunctionExt, CFGetCellParam, CFGetDoubleParam, CFGetDoubleParamExt, CFGetLongParam, CFGetParamInfo, CFGetRangeParam, CFGetStringParam, CFSetResult, EnumCustomFunction, GetCustomFunction, RemoveCustomFunction methods
DLL Correspondence
SSAddCustomFunction function