Main Content

export

Export Safety Analysis Manager spreadsheet to Excel

Since R2023b

Description

export(spreadsheet,fileName) saves the Safety Analysis Manager spreadsheet as an Excel® file with the file name, Name.

example

Examples

collapse all

Create a new spreadsheet in the Safety Analysis Manager.

mySpreadsheet = safetyAnalysisMgr.newSpreadsheet;

Add three rows to the spreadsheet.

addRow(mySpreadsheet,Count=3)

Add a text and check box column to the spreadsheet.

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

Update the new column labels.

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

Save the spreadsheet with the name mySpreadsheet in the current folder.

save(mySpreadsheet,"mySpreadsheet.mldatx")

Save the spreadsheet to an Excel file with the name myNewSpreadsheet and save it in the current folder.

export(mySpreadsheet,"myNewSpreadsheet.xls")

Input Arguments

collapse all

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

File name of the file, specified as a string scalar or character vector. When specifying the spreadsheet file name, you must include an extension compatible with Excel, such as .xls. If you do not want to save the file in the current directory, specify the path and file name.

Data Types: char | string

Version History

Introduced in R2023b