Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Copying data from HTML to Excel
#1
Solved: 10 Years, 8 Months, 3 Weeks ago
Hi All,

I am fairly a new user of QTP.

I have to copy the data in the web page to Excel.
Please help me...!

Note: The data was not present in Web tables.
Reply
#2
Solved: 10 Years, 8 Months, 3 Weeks ago
Santhosh,

We get the value using of getrowwithcelltext() function. To get the row of the text.
Please clearly explain ur Requirement.

Thanks,
Arul.D


Reply
#3
Solved: 10 Years, 8 Months, 3 Weeks ago
Hi Arul,

My requirement is like this.

Our App generates 3 reports HTML,Excel and PDF respectively.
I have to compare the three reports with master data.
So what i planned is keeping the excel report as it is, I will prepare one more excel sheet with a specific format which i need to test.

I have to copy the data from HTML and PDF to two excel sheet where i can compare the data using any excel macro or conditional formatting or something else,

The main challenge for me is to copy the required data from HTML or PDF into Excel where i can compare it.

Please help me in this regard.
Reply
#4
Solved: 10 Years, 8 Months, 3 Weeks ago
Hey Arul,

I want the entire page to be copied into Excel, and i am not sure whether everytime my page has a constant string.

Let us assume, you typed something in google search like "Arul" and all the related info will be displayed in the search page.

I have to copy the entire search page into excel with the same format.
Reply
#5
Solved: 10 Years, 8 Months, 3 Weeks ago
try this...

Code:
strPageValues=Browser("").Page("").Object.body.innertext

see if it works.
Reply
#6
Solved: 10 Years, 8 Months, 3 Weeks ago
Ankesh,

Thank for the Quick reply, then will it will get the unnecessary td,tr,br's etc.
i want to paste this into Excel via Global Data sheet.

Any Clues.
My Second reply will clearly explain the functionality exactly what i needed.
Reply
#7
Solved: 10 Years, 8 Months, 3 Weeks ago
Hi Santhosh,
Ankesh's code will give you innertext ...i.e...it will not display the tags(td,tr,br's).

Regards,
Ravi
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Want to read the data from excel and set read value in the JavaTable rajeevk7 0 2,161 07-10-2017, 04:20 PM
Last Post: rajeevk7
  Need help for copying values from one excel to another excel vinodhiniqa 0 1,182 07-06-2017, 05:33 PM
Last Post: vinodhiniqa
  dtLocalSheet empty even though excel file contains data cantorre 2 2,202 05-10-2017, 12:47 PM
Last Post: vidhi
  Reading data from excel sheet serenediva 1 8,776 03-03-2017, 10:07 AM
Last Post: vinod123
  Customized HTML reports in QTP azeem 11 48,300 12-31-2016, 02:57 PM
Last Post: chevronneraji

Forum Jump:


Users browsing this thread: 1 Guest(s)