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, see创造Macro Using Multiple MATLAB Functions.
Integrate add-in functions into Excel macros using custom Visual Basic®for Applications (VBA) code. For VBA programming techniques, see使用VBA集成组件.
Functions
compiler.build.excelAddIn |
创造MicrosoftExceladd-in |
compiler.build.exceladdinoptions |
Options for buildingExceladd-ins |
compiler.package.installer |
创造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. - How Excel Add-In Compilation Works
Overview of howMATLAB Compilerworks with Excel add-ins.
创造and Integrate Add-Ins
- 创建Matlab的Excel加载项
创造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
创造an Excel add-in with multiple functions and call your custom functions in Excel.
创造Macros Using Function Wizard
- 创造Macro Using Multiple MATLAB Functions
Use the Function Wizard to create a macro using MATLAB functions with variable-length inputs and outputs. - 创造Macros with Graphical Functions
创造macros that display graphical output and dialog boxes using the Function Wizard. - 安装和使用函数向导
安装功能向导加载项,并使用编译的MATLAB函数创建宏。
创造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. - 使用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.