Main Content

SpreadsheetCell

Cell in spreadsheet in Safety Analysis Manager

Since R2023b

Description

SpreadsheetCell objects represent cells in spreadsheets in the Safety Analysis Manager. Use SpreadsheetCell objects to configure spreadsheet cell properties you use in safety analyses.

Creation

To create a SpreadsheetCell object, use the getCell function on a Spreadsheet object.

Properties

expand all

This property is read-only.

Row location of the cell in the spreadsheet, returned as a positive integer. The column index of the leftmost column of the spreadsheet is 1.

Data Types: uint64

This property is read-only.

Column location of the cell in the spreadsheet, returned as a positive integer. The row index of the topmost row of the spreadsheet is 1.

Data Types: uint64

This property is read-only.

Label of the column in the spreadsheet that contains the cell, returned as a character vector.

Data Types: char

Cell value, specified as these types, depending on the column type:

Column TypeValue TypeSee
TextString scalar or character vectorAdd Rows and Columns to a Spreadsheet
Check BoxLogical true (1) or false (0)Create a Check Box Column
EnumerationString scalar, character vector, or explicit value specified by an enumeration classCreate an Enumeration Column and Add Enumeration Type Column
DerivedString scalar derived from the output of the column formulaCreate a Derived Column That Outputs Based on Two Column Values

Data Types: char | string

Cell description, specified as a string scalar or character vector.

Data Types: char | string

Object Functions

addFlagAdd flag to Safety Analysis Manager cell
clearFlagsClear flags in Safety Analysis Manager spreadsheet
getFlagsRetrieve flags from Safety Analysis Manager spreadsheets
getLinksGet links associated with spreadsheet cell in Safety Analysis Manager
getSpreadsheetRetrieve spreadsheet containing specified cell

Examples

collapse all

Suppose that only one spreadsheet is loaded in the Safety Analysis Manager. Retrieve the Spreadsheet object of the spreadsheet.

mySpreadsheet = safetyAnalysisMgr.getOpenDocuments;

Retrieve the cell in the second row and the second column of the spreadsheet as a SpreadsheetCell object.

myCell = getCell(mySpreadsheet,2,2);

Set the cell value to This is a value.

myCell.Value = "This is a value";

Version History

Introduced in R2023b