How can you show the data from a particular row and a particular colum from Data Table in QTP

Showing Answers 1 - 4 of 4 Answers

ravis0512

  • Jan 24th, 2006
 

Dear guys,

Try this below code

NumColumns=datatable.GlobalSheet.GetParameterCount
NumRows=datatable.GlobalSheet.getrowcount
For i =
1 to NumRows
Datatable.SetCurrentRow(i)
For j =
1 to NumColumns
tblCellText = Datatable(j,dtGlobalsheet)
If tblCellText <>
"" Then
Msgbox
"The Text in Row: " & i & " and Column: " & j & " is: " & tblCellText
End If
Next
Next

Regards

Ravi Bandaru 

kallol raha

  • Jul 19th, 2006
 

use

Datatable.getsheet("Sheet Name").getparameter("Column Name").valuebyrow(rownumber)

Anil_Sharga

  • Feb 11th, 2007
 

Data from a particular row can be shown by Test> Settings> Run selecting all rows or one row or a particular row. Data from a particular cell or column can be shown by enhancing script with table check point.

  Was this answer useful?  Yes

amninder

  • Apr 24th, 2008
 

try this simple code:
enter some values in datatable....

a=inputbox ("Enter the row : ")
b=inputbox ("Enter Column:")
msgbox "Row:" & a & "Column:" & b
datatable.SetCurrentRow(Cint(a))
c=datatable.Value(CInt(b),2)
msgbox c

This code will fetch the row and column from user and will show the specific value from the datatable...
hope this works for you

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions