Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to extract value from apps output and populate in spreadsheet
#1
Solved: 11 Years, 3 Months, 1 Week ago
I am using qtp to provide some input value to an application.
The web application has few input fields.
After clicking enter( in the app) as a result, the app returns me some values which has row name and then the value. Example
Input field is "PersonId" and value I provide is 11
PersonId: 11

Output field is FirstName and LastName and values are as follows

FirstName Lekha
LastName Das

I need to capture this output data and populate it in either spreadsheet
or in some kind of table format. Can someone help me in providing the info how can i use qtp to do that. My email is lekha_das@yahoo.com if you like to email. I am using qtp11.
Thank you
Reply
#2
Solved: 11 Years, 3 Months, 1 Week ago
Hi Lekha,

Have you tried spying on the area where these output values are displayed in the application? If it is a webtable, your job gets easier.

If it is a webtable:

I am giving example for "FirstName Lekha" type.

Code:
getRowCount = Browser("").Page("").WebTable("").GetROProperty("rows")
For counter = 1 To getRowCount
     DataTable.SetCurrentRow(counter)
     DataTable("Column1",dtLocalSheet) = Browser("").Page("").WebTable("").GetCellData(counter,1) //It will give you FirstName/LastName i.e values present under 1st column
     DataTable("Column2",dtLocalSheet) = Browser("").Page("").WebTable("").GetCellData(counter,2) //It will give you Lekha/Das i.e values present under 2nd column
Next
DataTable.SetCurrentRow(1)

Hope this helps you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is QTP suitable for banking apps? hulan 1 3,298 10-20-2016, 05:16 PM
Last Post: Ankur
  Extract and save a file from zip folder using VB Script karthicksri07 1 6,417 06-29-2016, 02:19 PM
Last Post: Ankesh
At Siebel and Oracle Apps Objects Praveenkumar86 0 1,932 05-16-2015, 12:16 AM
Last Post: Praveenkumar86
  Output Values error Tasleem 3 3,906 10-27-2014, 02:13 PM
Last Post: Tasleem786
  Invalid File error importing a spreadsheet but only on a VM msacks 1 2,725 10-19-2014, 09:04 PM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 1 Guest(s)