ExcelAdd-Ins
MATLAB Compiler™enables you to package MATLAB programs into add-ins for use withMicrosoft Excel. Excel add-ins allow users to interact with spreadsheet data, display MATLAB figures, open dialog boxes, and more.
To deploy Excel add-ins, you install the add-in andMATLAB Runtimeon the target machine. After installation, you can:
Invoke add-in functions directly in the form of Excel custom functions. For an example, seeAssign Multiple MATLAB Functions to Excel Class.
Integrate add-in functions into Excel macros using the Function Wizard. Macros allow you to specify input and output cells, handle multiple outputs, and set additional run-time options. For an example on using the Function Wizard, seeCreate Macro Using Multiple MATLAB Functions.
Integrate add-in functions into Excel macros using custom Visual Basic®for Applications (VBA) code. For VBA programming techniques, seeIntegrate Components Using VBA.
Functions
compiler.build.excelAddIn |
CreateMicrosoftExceladd-in |
compiler.build.ExcelAddInOptions |
Options for buildingExceladd-ins |
compiler.package.installer |
Create an installer for files generated byMATLABCompiler |
compiler.package.InstallerOptions |
Options for creatingMATLABCompilerpackage installers |
Topics
Requirements and Highlights
- Excel Target Requirements and Limitations for MATLAB Compiler
See tasks you must perform before creating Excel add-ins usingMATLAB Compiler. - Distribute Add-Ins and Integrate into Microsoft Excel
To deploy add-ins, register the add-in and utility libraries, then install the add-in. - Excel编译插件是如何运作的吗
Overview of howMATLAB Compilerworks with Excel add-ins.
Create and Integrate Add-Ins
- Create Excel Add-In from MATLAB
Create an add-in containing a custom function and test it in an Excel workbook. - Distribute Add-Ins and Integrate into Microsoft Excel
To deploy add-ins, register the add-in and utility libraries, then install the add-in.
Use Custom Functions inExcel
- Assign Multiple MATLAB Functions to Excel Class
Create an Excel add-in with multiple functions and call your custom functions in Excel.
Create Macros Using Function Wizard
- Create Macro Using Multiple MATLAB Functions
Use the Function Wizard to create a macro using MATLAB functions with variable-length inputs and outputs. - Create Macros with Graphical Functions
Create macros that display graphical output and dialog boxes using the Function Wizard. - 安装和使用Function Wizard
Install the Function Wizard add-in and create macros using compiled MATLAB functions.
Create Macros Using VBA
- Implement User Interface Using Visual Basic Form Controls
Use VBA form controls to create a spectral analysis application with a custom user interface. - Integrate Components Using VBA
Apply programming techniques for integrating your deployable Excel component into aMicrosoft Visual Basicapplication.
Manage Data Exchange
- Reference Utility Classes
Reference the MWComUtil library in your VBA programming environment. - Data Conversion Rules
Learn the process of converting data between MATLAB and Microsoft COM variants. - Array Formatting Flags
Refer to the flags that control data formatting. - Data Conversion Flags
Refer to the flags that control data conversion.
Troubleshooting
- Errors and Solutions
View errors you may encounter usingMATLAB Compiler,probable causes for these errors, and suggested solutions. - Deployment Product Terms
See descriptions for deployment product terms.