Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

MLProgramId

Specify MATLAB version

Syntax

= MLProgramId(version)
MLProgramId version

Description

example

= MLProgramId(version) specifies the MATLAB® version to open when Spreadsheet Link™ starts in Microsoft® Excel®. Enter this syntax when working in a worksheet cell.

example

MLProgramId version specifies the MATLAB version. Enter this syntax when working in a VBA macro.

Examples

collapse all

To open MATLAB (R2016a) in Microsoft Excel, enter this text in any worksheet cell:

=MLProgramId("9.0")

The worksheet cell displays 0 when MLProgramId runs.

To check that the preference is set, open the Preferences dialog box. The MATLAB program id box contains 9.0. For details about the Preferences dialog box, see Setting Spreadsheet Link Preferences.

Start MATLAB.

For troubleshooting, see Startup Errors.

To open MATLAB (R2016a) in Microsoft Excel, enter this text at the beginning of the VBA macro:

MLProgramId "9.0"

Run the macro by clicking Run Macro (F5). For details about running macros, see Excel Help.

To check that the preference is set, open the Preferences dialog box. The MATLAB program id box contains 9.0. For details about the Preferences dialog box, see Setting Spreadsheet Link Preferences.

Start MATLAB.

For troubleshooting, see Startup Errors.

Input Arguments

collapse all

MATLAB version, specified as a string to indicate which MATLAB version to open when multiple versions are installed on the computer.

The Windows® registry defines the MATLAB version number under ...\Mathworks\MATLAB. For example, MATLAB R2016a corresponds to version 9.0 in the registry.

Example: "9.0"

Introduced in R2016b

Was this topic helpful?