export
Description
export(
saves the Safety Analysis Manager spreadsheet as an Excel® file with the file name, spreadsheet
,fileName
)Name
.
Examples
Save Spreadsheet to Excel File
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
spreadsheet
— Spreadsheet in Safety Analysis Manager
Spreadsheet
object
Spreadsheet in the Safety Analysis Manager, specified as a
Spreadsheet
object.
fileName
— File name of file
string scalar | character vector
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
See Also
Objects
Functions
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)