Main Content

safetyAnalysisMgr.newSpreadsheet

Create new spreadsheet in Safety Analysis Manager

Since R2023b

Description

example

spreadsheet = safetyAnalysisMgr.newSpreadsheet creates and loads a new spreadsheet in the Safety Analysis Manager. The new spreadsheet has one row and one column.

example

spreadsheet = safetyAnalysisMgr.newSpreadsheet(templateFile) creates a new spreadsheet by using the specified template file.

example

spreadsheet = safetyAnalysisMgr.newSpreadsheet(group,templateName) creates a new spreadsheet by using the specified registered template name in the template group, group.

Examples

collapse all

Create a new spreadsheet in the Safety Analysis Manager.

mySpreadsheet = safetyAnalysisMgr.newSpreadsheet
mySpreadsheet = 

  Spreadsheet with properties:

    FileName: ''
        Rows: 1
     Columns: 1
 Description: ''

Suppose you have a template in the current working folder, myTemplate.mldatx that has three columns. Create a new spreadsheet in the Safety Analysis Manager that uses this template.

mySpreadsheet = ...
safetyAnalysisMgr.newSpreadsheet("myTemplate.mldatx");
mySpreadsheet = 

  Spreadsheet with properties:

    FileName: ''
        Rows: 1
     Columns: 3
 Description: ''

Create a new spreadsheet in the Safety Analysis Manager that uses the template, FMEA available in the built-in group, MW_Aerospace_Templates.

mySpreadsheet = ...
safetyAnalysisMgr.newSpreadsheet("MW_Aerospace_Templates","FMEA");
mySpreadsheet = 

  Spreadsheet with properties:

    FileName: ''
        Rows: 1
     Columns: 7
 Description: ''

Input Arguments

collapse all

Template file name, specified as a string scalar or character vector. You must select a template .mldatx file, and the argument must include the .mldatx extension. If the file is not in the current directory, specify the path and the file name.

Data Types: char | string

Registered template group, specified as "MW_Aerospace_Templates" to access built-in templates, or a string scalar or character vector that is the name of the custom template group. For more information on how to register custom templates and groups, see Register Safety Analysis Manager Templates.

Data Types: char | string

Registered template name in the specified group, group, specified as a string scalar or character vector. The built-in group, MW_Aerospace_Templates, includes these templates:

Template NameDescription
"FMEA"An example Failure Mode and Effects Analysis (FMEA) template.
"AFHA"An example Aircraft Functional Hazard Assessment (AFHA) template.
"SFHA"An example System Functional Hazard Assessment (SFHA) template.

Data Types: char | string

Output Arguments

collapse all

New spreadsheet in the Safety Analysis Manager, returned as a Spreadsheet object.

Version History

Introduced in R2023b