Main Content

compiler.package.ExcelClientForProductionServerOptions

Options for creating an installer for an Excel client for MATLAB Production Server

Since R2021b

Description

example

opts = compiler.package.ExcelClientForProductionServerOptions(results) creates a default ExcelClientForProductionServerOptions object opts using the compiler.build.Results object results generated from the compiler.build.excelClientForProductionServer function. The ExcelClientForProductionServerOptions object is passed as an input to the compiler.package.excelClientForProductionServer function.

example

opts = compiler.package.ExcelClientForProductionServerOptions(results,Name,Value) creates an ExcelClientForProductionServerOptions object opts using the compiler.build.Results object results with additional options specified using one or more name-value arguments.

example

opts = compiler.package.ExcelClientForProductionServerOptions(clientLibrary,serverArchive) creates an ExcelClientForProductionServerOptions object opts. clientLibrary is the name of Excel client library being installed and serverArchive is the name of the CTF archive deployed on the Production Server.

example

opts = compiler.package.ExcelClientForProductionServerOptions(clientLibrary,serverArchive,Name,Value) creates an ExcelClientForProductionServerOptions object opts using the client library and server archive and additional customizations specified by name-value arguments.

Examples

collapse all

Create an ExcelClientForProductionServerOptions object using the results from the compiler.build.excelClientForProductionServer function. You can specify additional options using name-value arguments.

For this example, build a production server archive using the file magicsquare.m located in matlabroot\extern\examples\compiler.

appFile = fullfile(matlabroot,'extern','examples','compiler','magicsquare.m');
serverBuildResults = compiler.build.productionServerArchive(appFile);

Build the Excel® client for the server archive using compiler.build.excelClientForProductionServer.

clientBuildResults = compiler.build.excelClientForProductionServer(serverBuildResults);

Create an ExcelClientForProductionServerOptions object. Use name-value arguments to specify the application name, author company, author name, installer name, and summary.

opts = compiler.package.ExcelClientForProductionServerOptions(clientBuildResults,...
    'ServerURL','https://localhost:9988')
opts = 

  ExcelClientForProductionServerOptions with properties:

      ServerArchive: 'magicsquare.ctf'
      ClientLibrary: 'magicsquare.dll'
      InstallerName: "magicsquareExcelClientInstaller"
      InstallerIcon: 'C:\Program Files\MATLAB\R2024a\toolbox\compiler\packagingResources\default_icon_48.png'
    MaxResponseSize: 750
      ServerTimeOut: 60
          ServerURL: 'https://localhost:9988'
     SSLCertificate: ''
            Version: '1.0'
          OutputDir: '.\magicsquareExcelClientInstaller'

You can modify the property values of an existing ExcelClientForProductionServerOptions object using dot notation. For example, set the installer name to MyMagicInstaller.

opts.InstallerName = 'MyMagicInstaller'

To create an installer for the standalone application, use the Results and ExcelClientForProductionServerOptions objects as inputs to the compiler.package.installer function.

compiler.package.excelClientForProductionServer(clientBuildResults,'Options',opts);
The function generates an installer named MyMagicInstaller within a folder named magicsquareExcelClientInstaller.

Create an ExcelClientForProductionServerOptions object using the client library and server archive and additional options specified as name-value arguments.

Build a production server archive using the mcc command.

mcc -W CTF:magicsquare -U -v magicsquare.m

Build a client-side Excel add-in using the mcc command.

mcc -W 'mpsxl:magicsquare,Class1,version=1.0' -b -v class{Class1:magicsquare.m} 

Create an ExcelClientForProductionServerOptions object. Use name-value arguments to specify the maximum server response size and the timeout delay in seconds.

opts = compiler.package.ExcelClientForProductionServerOptions(...
    'ClientLibrary', 'magicsquare.dll',...
    'ServerArchive','magic.ctf',...
    'MaxResponseSize',1024,...
    'ServerTimeOut',200)
opts = 

  ExcelClientForProductionServerOptions with properties:

      ServerArchive: 'magic.ctf'
      ClientLibrary: 'ClientLibrary.dll'
      InstallerName: "ClientLibraryExcelClientInstaller"
      InstallerIcon: 'C:\Program Files\MATLAB\R2024a\toolbox\compiler\packagingResources\default_icon_48.png'
    MaxResponseSize: 1024
      ServerTimeOut: 200
          ServerURL: ''
     SSLCertificate: ''
            Version: '1.0'
          OutputDir: '.\ClientLibraryExcelClientInstaller'

Input Arguments

collapse all

Excel client build results, specified as a compiler.build.Results object. Create the Results object by saving the output from the compiler.build.excelClientForProductionServer function.

Excel client library, specified as a character vector or a string scalar.

Example: 'D:\Documents\MATLAB\work\MagicSquare\magic.dll

Data Types: char | string

Name of the production server archive, specified as a character vector or a string scalar.

Example: 'D:\Documents\MATLAB\work\MagicSquare\magic.ctf

Data Types: char | string

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: 'Version','9.5' specifies the version of the installed application.

Name of the installer file, specified as a character vector or a string scalar. The extension is determined by the operating system in which the function is executed.

Example: 'InstallerName','MagicSquare_Excel_Installer'

Path to an image file used as the installer's icon, specified as a character vector or a string scalar.

The default path is:

'matlabroot\toolbox\compiler\packagingResources\default_icon_48.png'

Example: 'InstallerSplash','D:\Documents\MATLAB\work\images\myicon.png'

Path to folder where the installer is saved, specified as a character vector or a string scalar.

If no path is specified, the default path for each operating system is:

Operating SystemDefault Installation Directory
Windows®.\addInNameExcelClientInstaller
Linux®./addInNameExcelClientInstaller
macOS./addInNameExcelClientInstaller

The . in the directories listed above represents the present working directory.

Example: 'OutputDir','D:\Documents\MATLAB\work\myExcelMPSInstaller'

Maximum size of the response the client accepts, specified as a size in megabytes (MB)

Example: 'MaxResponseSize',420

Server time out delay, specified in seconds. The value specifies how long the client waits for a response before it times out.

Example: 'ServerTimeOut',200

MATLAB Production server URL, specified as a character vector or a string scalar. It must have the following format:

http://path.to.url:port

Example: 'ServerURL','https://localhost:9988'

Data Types: char | string

Path to the self signed certificate for HTTPS, specified as a character vector or a string scalar.

Example: 'SSLCertificate','domain.crt'

Data Types: char | string

Version number of the installed application, specified as a character vector or a string scalar.

Example: 'Version','2.0'

Data Types: char | string

Output Arguments

collapse all

Installer options, returned as an ExcelClientForProductionServerOptions object.

Version History

Introduced in R2021b