Main Content


Export Safety Analysis Manager spreadsheet to Excel

Since R2023b



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


collapse all

Create a new spreadsheet in the Safety Analysis Manager.

mySpreadsheet = safetyAnalysisMgr.newSpreadsheet;

Add three rows to the spreadsheet.


Add a text and check box column to the spreadsheet.


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 the spreadsheet to an Excel file with the name myNewSpreadsheet and save it in the current folder.


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