This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Create and Install a Deployable Archive with Excel Integration For MATLAB Production Server

Supported platform: Windows®

This example shows how to create a deployable archive with Excel® integration from a MATLAB® function. You can then give the generated archive to a system administrator to deploy on MATLAB Production Server™.

Create Function In MATLAB

In MATLAB, examine the MATLAB program that you want to package.

For this example, write a function mymagic.m as follows.

function y = mymagic(x)

y = magic(x);

At the MATLAB command prompt, enter mymagic(3).

The output is:

 ans =
     8     1     6
     3     5     7
     4     9     2

Create Deployable Archive with Excel Integration Using Production Server Compiler App

  1. On the MATLAB Apps tab, on the far right of the Apps section, click the arrow. In Application Deployment, click Production Server Compiler. In the MATLAB Compiler SDK project window, click Deployable Archive with Excel integration.

    Alternatively, you can open the Production Server Compiler app by entering productionServerCompiler at the MATLAB prompt.

  2. In the MATLAB Compiler SDK project window, specify the files of the MATLAB application that you want to deploy.

    1. In the Exported Functions section, click .

    2. In the Add Files window, browse to the example folder, and select the function you want to package.

      Click Open.

    The function mymagic.m is added to the list of main files.

Customize the Application and Its Appearance

You can customize your deployable archive with Excel integration, and add more information about the application as follows:

  • Archive information — Editable information about the deployed archive with Excel integration.

  • Client configuration — Configure the MATLAB Production Server client. Select the Default Server URL, decide wait time-out, and maximum size of response for the client, and provide an optional self-signed certificate for https.

  • Additional files required for your archive to run — Additional files required by the generated archive to run. These files are included in the generated archive installer. See Manage Required Files in Compiler Project (MATLAB Compiler SDK).

  • Files installed with your archive — Files that are installed with your archive on the client and server. The files installed on the server include:

    • Generated deployable archive (.ctf)

    • Generated readme.txt

    The files installed on the client include:

    • mymagic.bas

    • mymagic.dll

    • mymagic.xla

    • readme.txt

    • ServerConfig.dll

    See Specify Files to Install with Application (MATLAB Compiler SDK).

  • Options — The option Register the resulting component for you only on the development machine exclusively registers the packaged component for one user on the development machine.

Package the Application

  1. To generate the packaged application, click Package.

    In the Save Project dialog box, specify the location to save the project.

  2. In the Package dialog box, verify that Open output folder when process completes is selected.

    When the deployment process is complete, examine the generated output.

    • for_redistribution — Folder containing the installer to distribute the archive on the MATLAB Production Server client and server

    • for_redistribution_files_only — Folder containing the files required for redistributing the application on the MATLAB Production Server client and server

    • for_testing — Folder containing the raw generated files to create the installer

    • PackagingLog.txt — Log file generated by MATLAB Compiler™

Install the Deployable Archive with Excel Integration

The archive must be deployed to a MATLAB Production Server instance before the add-in works.

To install the deployable archive on a server instance:

  1. Locate the archive in the for_redistribution_files_only\server\ folder.

    The file name is similar to archiveName.ctf.

  2. Copy the archive file to the auto_deploy folder of the server instance. The server instance automatically deploys it and makes it available to interested clients.

For more information, see MATLAB Production Server documentation.

See Also

| |

Related Topics