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
The output is:
ans = 8 1 6 3 5 7 4 9 2
Create Deployable Archive with Excel Integration Using Production Server Compiler App
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 Production Server Compiler project window, click Deployable Archive with Excel integration.
Alternatively, you can open the Production Server Compiler app by entering
productionServerCompilerat the MATLAB prompt.
In the Production Server Compiler project window, specify the files of the MATLAB application that you want to deploy.
In the Exported Functions section, click .
In the Add Files window, browse to the example folder, and select the function you want to package.
Doing so adds the function
mymagic.mto 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
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 file)
The files installed on the client include:
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
To generate the packaged application, click Package.
In the Save Project dialog box, specify the location to save the project.
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.html— Log file generated by MATLAB Compiler SDK™
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:
Locate the archive in the
The file name is similar to
Copy the archive file to the
auto_deployfolder of the server instance. The server instance automatically deploys it and makes it available to interested clients.