User`s guide

1 Getting Started
Formula functions of this type are most useful to access a function of one or
more inputs that returns a single scalar value. When you require m ultiple
outputs or outputs representing ranges of data, you nee d a more general
Visual Basic subroutine. For details about integrating Excel Builder
components into Microsoft Excel via Visual Basic for Applications, see
Chapter 2, “Programming with MATLAB Builder for Excel”.
Deploying the Component
After you create and test your component, you then create an Excel add-in
(
.xla) from the VBA code generated by Ex cel Builder by saving the worksheet
file as an
.xla file to the <project_dir>\distrib directory.
For more information about creating an Excel Add-in, refer to the Excel
documentation on creating a
.xla file.
1 Start Excel.
2 Select Tools > Macros > Visual Basic Editor .
3 In the Microsoft Visual Basic window, select File > Import.
4 Select VBA file (.bas)fromthe<projectdir>distrib directory.
5 Close the Visual Basic Edito r.
6 From the Excel worksheet window, select File > Save As.
7 Set Save as to Microsoft E xcel add-in (*.xla).
8 Save the .xla file to <projectdir>\distrib.
Yo u can also deploy files i n
*.xls and *.bas formats. To deploy in *.xls
format, follow the previous steps but change the Save as type in step 7 to
*.xls. To deploy as VBA code, follow steps 1 to 4 only.
Packaging and Distributing the Component
After you have successfully compiled your models and created the Excel
add-in, you can package the component for distribution to your end users by
1-8