Retrieving values from specific rows of a DataTable
Question ID: 105237
0
0

I need to understand the proper syntax for retrieving the value of a cell from a specific column and row of a DataTable that has been populated from a comma-delimited file.

I found some sample code from a QTP source online, but when I execute it, I get the following run-time error: "Type mismatch: ‘GetSheet"’

I will attach the script and the csv file to this case.

Thank you.

Marked as spam
Posted by (Questions: 17, Answers: 5)
Asked on January 30, 2014 4:55 am
134 views
Answers (1)
1
Private answer

First you need to set the current row(varCR in the data table
DataTable.SetCurrentRow(varCR)

Then you can select the column (varColumn) from the sheet
(strSheetName) to get myVar
myVar= DataTable.Value(varColumn, strSheetName)

NOTE: The sheet can be the sheet name, index or reserved variable dtLocalSheet, or dtGlobalSheet

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on January 30, 2014 4:56 am
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top