= MLProgramId(version) specifies
the MATLAB® version to open when Spreadsheet Link™ starts in Microsoft®
Excel®.
Enter this syntax when working in a worksheet cell.
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.
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 button. 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.
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"
Tips
To work with VBA code in Excel with Spreadsheet Link, you must enable Spreadsheet Link as a reference in the Microsoft
Visual Basic® Editor. For details, see Installation.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.