Skip to Main Content Skip to Search
Product Documentation

Startup and Shutdown

Automatically Starting the Spreadsheet Link EX Software

When installed and configured according to the instructions in Add-in Setup, the Spreadsheet Link EX and MATLAB software automatically start when you start a Microsoft Excel session.

Manually Starting the Spreadsheet Link EX Software

To start the Spreadsheet Link EX and MATLAB software manually from the Excel interface:

  1. Click Tools > Macro. (In Excel 2007, click the View tab or the Developer tab, and then click the Macros button.)

  2. Enter matlabinit into the Macro Name/Reference box.

    For more information about the matlabinit function, see Function Reference.

  3. Click Run. The MATLAB Command Window button appears on the Microsoft Windows taskbar.

Connecting to Already Running MATLAB Session

By default, Spreadsheet Link EX starts a new MATLAB session. Alternatively, it can connect to an already running MATLAB session.

To connect a new Excel session to already running MATLAB session:

  1. In MATLAB, enter the following command:

    enableservice('AutomationServer', true)

    This command converts a running MATLAB session into an Automation server.

  2. Start a new Excel session. It automatically connects to the running MATLAB session.

Alternatively, you can start MATLAB as an automation server from the beginning. To start MATLAB as an automation server, use the automation command-line option:

matlab -automation

This command does not start MATLAB in a full desktop mode. To start MATLAB in a full desktop mode, use the -desktop option:

matlab -automation -desktop

If you always use MATLAB as an automation server, modify the shortcut that you use to start MATLAB:

  1. Right-click your MATLAB shortcut icon. (You can use the icon on your desktop or in the Windows Start menu.)

  2. Select Properties.

  3. Click the Shortcut tab.

  4. Add the string -automation in the Target field. Remember to leave a space between matlab.exe and /automation.

  5. Click OK.

Stopping the Spreadsheet Link EX Software

If you started the Spreadsheet Link EX and MATLAB software from the Excel interface:

If you connected an Excel session to an existing MATLAB session, close Excel and MATLAB sessions separately. Closing one session does not automatically close the other.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS