GetCustomFunction, ScriptGetCustomFunction Methods
Applies To
fpSpread control
Description
Returns information about the specified custom function.
Syntax
BOOL CSpreadSheet::GetCustomFunction(LPCTSTR FuncName, short* MinArgs, short* MaxArgs, long* Flags);
fpSpread1.GetCustomFunction(ByVal FuncName As String, MinArgs As Integer, MaxArgs As Integer, Flags As Long) As Boolean
Note: The ScriptGetCustomFunction method uses the same syntax except method parameters that are not passed "ByVal" are declared as variants. For more information on Script methods, see Scripting Environment Usage. |
Parameters
The following parameters are available:
Parameter | Description | |
---|---|---|
FuncName | Name of function that you specify | |
MinArgs | Minimum number of parameters accepted by custom function If the custom function was originally created with the AddCustomFunction method, this value is taken from the ParameterCnt parameter. If custom function was originally created with the AddCustomFunctionExt method, the value is taken from the MinParamCnt parameter. |
|
MaxArgs | Maximum number of parameters accepted by custom function If the custom function was originally created with the AddCustomFunction method, this value is taken from the ParameterCnt parameter. If custom function was originally created with the AddCustomFunctionExt method, the value is taken from the MaxParamCnt parameter. |
|
Flags | Requests references instead of cell values | |
Return Value | Description | |
0 | Custom function receives cell value Custom function could have been created with the AddCustomFunction method or AddCustomFunctionExt with Flags parameter set to 0. |
|
Constant: CustomFunctionFlagsNone | ||
1 | Function receives cell references Custom function was originally created with the AddCustomFunctionExt method |
|
Constant: CustomFunctionFlagsWantCellRef | ||
2 | Method receives range references Custom function was originally created with the AddCustomFunctionExt method |
|
Constant: CustomFunctionFlagsWantRangeRef |
Remarks
Call the EnumCustomFunction method to return the names of the custom functions in the control to supply for the FuncName parameter.
Note: Call this method if you use the Spread control in a scripting environment (for example, Microsoft's Visual InterDev or Internet Explorer) or a non-scripting environment. However, if you want to use the Spread control in a scripting environment and you want to change any parameter that is not passed "ByVal", you must set the ScriptEnhanced property to True and call the ScriptGetCustomFunction method. ScriptGetCustomFunction method parameters that are not passed "ByVal" are declared as variants. |
This method returns information for the entire workbook, including all sheets in the control.
Return Type
True if successful; otherwise, False.
See Also
ScriptEnhanced property
CustomFunction event
AddCustomFunction, AddCustomFunctionExt, CFGetCellParam, CFGetDoubleParam, CFGetDoubleParamExt, CFGetLongParam, CFGetParamInfo, CFGetRangeParam, CFGetStringParam, CFSetResult, EnumCustomFunction, RemoveCustomFunction methods
DLL Correspondence
SSGetCustomFunction function