XLL+ Class Library (7.0)

XlArgument Element

This element represents a single argument to an Excel add-in function, or an argument contained within a Choice or Group argument. The XlArgument element must have the following required child element: Signature. The XlArgument element may have the following optional child element: ValueList. The XlArgument element has the one required attribute: Name. The XlArgument element may have any or all of the following optional attributes: Description, DefaultValueText, ContainerClass, ValueListIsExclusive, ShowValueListInFormulaWizard, ShowPopupInFormulaWizard.

Attributes

Name

Required. Name of the argument, as it will appear in the Excel Formula Wizard. This name should be unique within a function. If it is not, then warnings will be issued by the XLL+ tools and the code will fail to compile.

Description

Description of the argument, as it will appear in the Excel Formula Wizard.

DefaultValueText

Default value used for argument if it is empty or missing. This text value will be inserted directly into code as the right-hand-side of an assignment.

ContainerClass

Template class used in C++ for the targets of vector or matrix arguments. For each vector or matrix argument to an add-in function, a local container variable is declared, and the input is copied into it after validation. If the argument's ContainerClass property is set, then the container will be of the type specified by the property. However, if the argument's container class property is left empty (the default), then the container class used will be that specified by DefaultVectorContainer or DefaultMatrixContainer as appropriate.

ValueListIsExclusive

Controls whether a value list is used to validate inputs. If this property is set to true, then the value list will be used to constrain the value of the input. If the input is not one of the values in the list, then an exception will be raised and the function will report an input error.

ShowValueListInFormulaWizard

Controls whether a value list is used to display a drop-down list in the Excel Formula Wizard. If this property is set to true, then the value list will be used to display a drop-down list in the Excel Formula Wizard. The property is ignored for arguments that are not scalar integer values.

ShowPopupInFormulaWizard

Sets whether the argument should have a popup button in the Formula Wizard. If false, this property will be ignored. If true, then the argument will be marked as requiring the Excel Formula Wizard extended user interface. The developer is reponsible for creating a class derived from CXlWizExUIPopupProviderBase, and for registering it, using CXlWizExUIArgumentPopupCreator.

Element Information

Number of occurrences

Unlimited

Parent elements

Arguments 

Child elements

Signature  ValueList 

See Also

XLL+ Function Schema