A typical calculator add-in, using labelled arguments
This simple add-in contains a calculator for calculating the value and derivatives of a vanilla option, and is a simpler version of the function in the SimpOpt sample.
The BSValue2 function expects its arguments to be in two groups: RefArgs (which are the same for all options on the same underlying security) and StdArgs (which vary for each option). Each group of arguments is expected to be either in an ordered vector, or in a labelled two-column array.
The labelled layout is very flexible, and can also offer improved transparency to the user. Using labelled groups, the user can lay out arguments to suit their own purposes, rather than to suit the requirements of a particular calculator function. This is especially useful when different functions have different requirements for the order of arguments.
The sample displays the following features:
LabelledArgs.chm
contains complete descriptions of the grouped arguments, accessible
from the Excel Formula Wizard.
The following steps were significant in creating and completing the LabelledArgs application.
The demonstration workbook, LabelledArgs.xls, shows how to use labelled arguments with the TFOLDT worksheet function for simple and powerful manipulation of large arrays of data.
CXlOper::Format | CXlOper::Ret
Each sample project is located in a sub-directory of the Samples directory of the XLL+ installation. To use the sample project, open the solution file LabelledArgs.sln or the project file LabelledArgs.vcproj.
You can enable debugging under Excel by using the Setup Debugging command in the XLL+ ToolWindow.
When delivered, the help files are excluded from the build.
You can enable the help build by selecting the files
LabelledArgs.help.xml
and
LabelledArgs.chm
in the Solution Explorer,
and using the right-click menu to view Properties.
Select the page "Configuration Properties/General" and
set the "Excluded from build" property to "No".
See Generating help
in the User Guide for more information.
List of Sample Projects | Groups (User Guide) | SimpOpt sample | TFOLD sample