Main Content

MATLAB Compiler for Microsoft Excel Add-In Prerequisites

Your Role in the Deployment Process

The table Application Deployment Roles, Goals, and Tasks describes the different roles, or jobs, that MATLAB® Compiler™ users typically perform. It also describes tasks they would most likely perform when running the examples in this documentation.

You may occupy one or more of the following roles.

Application Deployment Roles, Goals, and Tasks

RoleKnowledge BaseResponsibilities
MATLAB programmer
  • Understand the end-user business requirements and the mathematical models that support them.

  • MATLAB expert

  • No IT experience

  • Build a Microsoft® Excel® add-in with MATLAB tools.

  • Package the component for distribution to customers.

  • Pass the package to the Microsoft Excel developer for further integration into the end-user environment.

.
Microsoft Excel developer
  • Little or no MATLAB experience.

  • Microsoft Excel expert.

  • Proficient writing VB/VBA code.

  • Roll out the packaged component and integrate it into the end-user environment.

  • Write VB/VBA code to complement or augment the Excel add-in built by the MATLAB programmer. Add and modify code as needed.

  • Uses Function Wizard to customize the add-in and create executable macros.

  • Verify that the final application executes reliably in the end-user environment.

Products, Compilers, and IDE Installation

Install the following products to run the example described in this chapter:

Macro Execution Security Levels in Microsoft Excel

If you will be creating macros and generating add-ins with MATLAB Compiler, adjust the security settings accordingly in Microsoft Excel.

Failure to do so may result in add-ins not being generated or warning messages sent to MATLAB Compiler

Depending on what version of Microsoft Excel you are using, do one of the following:

  • For Microsoft Excel 2010 and newerExcel versions:

    1. Click File > Options > Trust Center > Trust Center Settings > Macro Settings.

    2. In Developer Macro Settings, select Trust access to the VBA project object model.

  • For Microsoft Excel 2007:

    1. Click the 2007 Excel ribbon button.

    2. Click Excel Options > Trust Center > Trust Center Settings > Macro Settings.

    3. In Developer Macro Settings, select Trust access to the VBA project object model.

  • For Microsoft Excel 2003:

    1. Click
      Tools > Macro > Security.

    2. For Security Level, select Medium.

Deployment Target Architectures and Compatibility

Before you deploy a component with MATLAB Compiler, consider if your target machines are 32-bit or 64-bit.

Applications developed on one architecture must be compatible with the architecture on the system where they are deployed.

For example, if you have a 64-bit system, you usually install a 64-bit version of MATLAB (and most other applications), by default. Running functions you have developed with a 64-bit version of MATLAB requires a Function Wizard installed with a 64-bit version of Microsoft Excel.

Migration Considerations for 32-bit and 64-bit Microsoft Excel

Add-ins created with MATLAB Compiler are compatible with both 32–bit and 64–bit versions of Microsoft Excel. MATLAB Compiler itself is in 64–bit only.

Dependency and Non-Compilable Code Considerations

Before you deploy your code, examine the code for dependencies on functions that may not be compatible with MATLAB Compiler.

For more detailed information about dependency analysis (depfun) and how MATLAB Compiler evaluates MATLAB code prior to compilation, see Write Deployable MATLAB Code.

For More Information

If you...See...
Want to verify your MATLAB code or function can be deployed successfullyWrite Deployable MATLAB Code
Know your function is deployable and want to select a Getting Started workflowChoosing Function Deployment Workflow