User`s guide

A Producing a COM Object from MATLAB
A-2
Capabilities
MATLAB Excel Builder enables you to pass Microsoft Excel worksheet values
to a compiled MATLAB model via Visual Basic for Applications (VBA) and to
return model output to a cell or range of cells in the worksheet. Each MATLAB
Excel Builder component is built as a stand-alone COM object. (COM is an
acronym for Component Object Model, Microsofts binary standard for object
interoperability. COM is the widely accepted standard for integration of
external functionality into Microsoft Office applications, such as Excel.) Each
MATLAB function included in a given component appears as a method of the
created COM class. The resulting call syntax from Visual Basic is
systematically mapped to the syntax of the original MATLAB. This mapping
provides an intuitive bridge from MATLAB, where the functions are created,
to Visual Basic, where the functions are ultimately called.
MATLAB Excel Builder provides robust data conversion and array formatting
to preserve the flexibility of MATLAB when calling from Visual Basic. Also
provided is custom error processing so that errors originating from MATLAB
functions are automatically manifested as Visual Basic exceptions. The
information returned with the error always references the original MATLAB
code, making debugging easy.
A simple versioning mechanism is also built into each component to help
manage deployment of multiple versions of the same component. Figure A-1
provides an overview of the process of creating a stand-alone COM object from
compiled MATLAB M-files.