Main Content

getSpreadsheet

Retrieve spreadsheet containing specified cell

Since R2024a

Description

spreadsheet = getSpreadsheet(spreadsheetCell) returns the spreadsheet that contains the specified spreadsheet cell.

example

spreadsheet = getSpreadsheet(spreadsheetRow) returns the spreadsheet that contains the specified spreadsheet row. (since R2024b)

example

Examples

collapse all

Suppose that you have a spreadsheet cell, myCell, but you do not know what spreadsheet includes the cell. To retrieve the spreadsheet, use getSpreadsheet and the name of the SpreadsheetCell object.

mySpreadsheet = getSpreadheet(myCell)
mySpreadsheet = 

  Spreadsheet with properties:

       FileName: ''
           Rows: 2
        Columns: 2
    Description: ''

Suppose that you have a spreadsheet row, myRow, but you do not know what spreadsheet includes the row. To retrieve the spreadsheet, use getSpreadsheet and the name of the SpreadsheetRow object.

mySpreadsheet = getSpreadheet(myRow)
mySpreadsheet = 

  Spreadsheet with properties:

       FileName: ''
           Rows: 2
        Columns: 2
    Description: ''

Input Arguments

collapse all

Cell in the Safety Analysis Manager spreadsheet, specified as a SpreadsheetCell object.

Since R2024b

Row in the Safety Analysis Manager spreadsheet, specified as a SpreadsheetRow object.

Output Arguments

collapse all

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

Version History

Introduced in R2024a