Main Content

saveTemplate

Save spreadsheet in Safety Analysis Manager as a template

Since R2023b

Description

example

saveTemplate(spreadsheet,fileName) saves the Safety Analysis Manager spreadsheet, spreadsheet, as a template file with the name fileName.

Examples

collapse all

Create a new spreadsheet in the Safety Analysis Manager.

mySpreadsheet = safetyAnalysisMgr.newSpreadsheet;

Add a text and check box column to the spreadsheet.

addColumn(mySpreadsheet,Count=2,Type=["text","checkbox"])

Update the labels of the new columns.

setColumnLabel(mySpreadsheet,2,"text column");
setColumnLabel(mySpreadsheet,3,"checkbox column");

Save the spreadsheet as a template with the name myNewTemplate in the current folder.

saveTemplate(mySpreadsheet,"myNewTemplate.mldatx")

Input Arguments

collapse all

Spreadsheet in the Safety Analysis Manager, specified as a Spreadsheet object.

File name of the template, specified as a string scalar or character vector. When specifying the template file name, you must include the .mldatx extension. If you do not want to save the file in the current directory, specify the path and the file name.

Data Types: char | string

Version History

Introduced in R2023b