Function GetRowData

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

3/25/23, 4:37 PM 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

sheetName Name of the sheet to be obtained. The value is a


string.

tableNo Number of the table with data to be obtained on a


specified sheet. The value is an integer starting from
0.

rowNo Number of the row with data to be obtained in a


specified table. The value is an integer starting from
0.

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('')

InsertRow( sheetName, tableNo, 2, datalist )


data = GetRowData(sheetName, tableNo, 2)
for s in data
Print(str(s) + ' ', False)
end
Print('')

SaveReportAs("result.xls")
Print('----------end----------')

Result

----------begin----------

data0 data1 data2 data3


----------end---------

Examples of Report Operation Function

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

Copyright © Huawei Technologies Co., Ltd.

https://10.98.117.5:31943/hedex/hedex.do?lib=OMC&id=omc.Scriptapp.mainpage&topicid=p_getrowdata_a&locale=en-us 3/3

You might also like