Main Content

getRow

Retrieve spreadsheet rows

Since R2024b

Description

row = getRow(spreadsheet,index) retrieves the row in the Safety Analysis Manager spreadsheet, spreadsheet, that has the index, index.

example

row = getRow(spreadsheetCell) retrieves the row that contains the Safety Analysis Manager spreadsheet cell, spreadsheetCell.

example

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 second row as a SpreadsheetRow object.

myRow = getRow(mySpreadsheet,2);

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 last row and the first column as a SpreadsheetCell object.

myCell = getCell(mySpreadsheet,mySpreadsheet.Rows,1);

Retrieve the row that contains the cell as a SpreadsheetRow object.

myRow = getRow(myCell,2);

Input Arguments

collapse all

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

Row index of the cell in the spreadsheet, returned as a positive integer. The first row has the index 1.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

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

Output Arguments

collapse all

Row in the spreadsheet, returned as a SpreadsheetRow object.

Version History

Introduced in R2024b