Write the MATLAB® code for the add-in, create the function using the Library Compiler app, and package it into an installer for distribution. You can import the executable in Excel as an add-in. The Function Wizard enables you to iteratively test, develop, and debug your MATLAB function.
Library Compiler | Package MATLAB programs for deployment as shared libraries and components |
libraryCompiler | Build and package functions for use in external applications |
componentinfo | Query system registry about component created with MATLAB Compiler |
mcc | Compile MATLAB functions for deployment |
deploytool | Compile and package functions for external deployment |
Package Excel Add-In with Library Compiler App
This example shows how to create a Microsoft Excel add-in that computes a magic square using the Library Compiler app.
Create Macros from MATLAB Functions
Creating Excel add-ins from your MATLAB code
Execute Functions and Create Macros
Workflow to incorporate your COM component into Microsoft Excel using the Function Wizard.
End-to-End Deployment of MATLAB Function
If you are still in the process of developing a MATLAB function that is not yet ready to be deployed, you may find this example to be an appropriate introduction to using MATLAB Compiler™ for Excel add-ins.
Execute Add-In and Graphical Function
Execute and test your functions, create macros, and more with the Function Wizard
How Does MATLAB Deploy Functions?
To deploy MATLAB functions, the compiler performs these tasks:
MATLAB Data Files in Compiled Applications
Using MATLAB data files in compiled applications
Calling Shared Libraries in Deployed Applications
The loadlibrary
function in MATLAB allows
you to load shared library into MATLAB.
Things to consider when creating an Excel Add-in with MATLAB Compiler
MATLAB Functions That Cannot Be Compiled
Functions not able to be compiled with MATLAB Compiler or MATLAB Compiler SDK™
Basics about the dependency analysis function
MEX-Files, DLLs, or Shared Libraries
How the dependency function handles MEX-files, DLLs, and shared libraries
Writing MATLAB code that is sure to compile
Standalone Applications and Arguments
How to pass arguments to standalone applications and run applications that use arguments
This appendix provides a table showing errors you may encounter using MATLAB Compiler, probable causes for these errors, and suggested solutions.