Function GetRowData
Function GetRowData
Function: GetRowData
Function Prototype
Note
Parameter Description
Return Value
Error Handling
Example
Result
This section describes the GetRowData function. This function enables you to obtain the data of a
row in a table.
Function Prototype
GetRowData(sheetName, tableNo, rowNo)
Note
None
Parameter Description
Parameter Description
Return Value
https://10.98.117.5:31943/hedex/hedex.do?lib=OMC&id=omc.Scriptapp.mainpage&topicid=p_getrowdata_a&locale=en-us 1/3
3/25/23, 4:37 PM Function: GetRowData
The return value is a string list. If this function is successfully called, the contents of the obtained
row are returned. Otherwise, an empty list is returned.
Error Handling
None
Example
sheetName = "sheet1"
tableNo = 0
datalist = ["data0", "data1", "data2", "data3"]
Print('----------begin----------')
NewReport()
page1 = AddSheet(sheetName)
table1 = AddTable(page1, 6, 4, "table1")
data = GetRowData(sheetName, tableNo, 2)
for s in data
Print(str(s) + ' ', False)
end
Print('')
SaveReportAs("result.xls")
Print('----------end----------')
Result
----------begin----------
https://10.98.117.5:31943/hedex/hedex.do?lib=OMC&id=omc.Scriptapp.mainpage&topicid=p_getrowdata_a&locale=en-us 2/3
3/25/23, 4:37 PM Function: GetRowData
https://10.98.117.5:31943/hedex/hedex.do?lib=OMC&id=omc.Scriptapp.mainpage&topicid=p_getrowdata_a&locale=en-us 3/3