ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
How to export(copy) the entire webtable from the webpage 
into Excelsheet? using Vb scripting
 Question Submitted By :: Hnayaka
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How to export(copy) the entire webtable from the webpage into Excelsheet? using Vb scripting
Answer
# 1
Can u be clear in the question you mean copy the contents 
of the webtable into excel or you need the whole webtable 
object into excel
 
Is This Answer Correct ?    1 Yes 0 No
Rentalavdml
 
  Re: How to export(copy) the entire webtable from the webpage into Excelsheet? using Vb scripting
Answer
# 2
Whole webtalbe content into the datatable. Including all 
its columns and rows
 
Is This Answer Correct ?    1 Yes 0 No
Hnayaka
 
 
 
  Re: How to export(copy) the entire webtable from the webpage into Excelsheet? using Vb scripting
Answer
# 3
Use DataTable.export('path of the x.ls') method and write 
all the contents into excel file. Hope this helps else letm 
e know.

Sridhar.
 
Is This Answer Correct ?    0 Yes 2 No
Sridhar
 
  Re: How to export(copy) the entire webtable from the webpage into Excelsheet? using Vb scripting
Answer
# 4
Sridhar thanks for the response. My question is I wanted to 
use the runtime webtable clomuns and rows as input to the 
another application during run time.

I have one application when we run with some inputs will 
get the results as a webtable format in the web 
application. I wanted to  use those inputs as a input to 
the another application during runtime.

Please let me know if your not clear with my question.

Thanks in advance.
 
Is This Answer Correct ?    0 Yes 0 No
Gururaj
 
  Re: How to export(copy) the entire webtable from the webpage into Excelsheet? using Vb scripting
Answer
# 5
Well,

I think you can copy all webtable (the table that is 
displayed on your test application) values into runtime 
table or datatable using two simple for loop and then 
export the runtime table to excel file with the command as 
mentioned by Shridhar.

I havent written any such script as of now. but will post 
it here when I write it.

Thanks,
Yogi.
 
Is This Answer Correct ?    0 Yes 0 No
Yogesh
 
  Re: How to export(copy) the entire webtable from the webpage into Excelsheet? using Vb scripting
Answer
# 6
As QTP Supports Data Corelation very well.. So the output 
from one obj/table can be used as input to another 
obj/table. As Yogi explained... you capture your values in 
the runtime data table and use it as the input to ur 
requirement. Simple Data Driven testing strategy will help 
you.
 
Is This Answer Correct ?    0 Yes 0 No
Jay Prakash
 
  Re: How to export(copy) the entire webtable from the webpage into Excelsheet? using Vb scripting
Answer
# 7
Please try this code. It will save the whole WebTable 
content in the form of excel sheet. 

Environment("Peportpath")="C:\Result.xls"
a=Browser("Google").Page("Google").WebTable
("index:=0").GetROProperty("outerhtml")
Set FSO = CreateObject("Scripting.FileSystemObject")
 Set WriteFile = FSO.CreateTextFile( Environment
("Peportpath"), True)
		writeFile.writeLine(a)
writeFile.close
 
Is This Answer Correct ?    1 Yes 0 No
Raj
 
  Re: How to export(copy) the entire webtable from the webpage into Excelsheet? using Vb scripting
Answer
# 8
For this first u need to add a webtable in the object 
repository and use this line

dim xl
set xl=createobject("Excel.Application")
xl.workbooks.open "c:/book1.xls"
set nsheet=xl.sheets.item(1)
row=Browser("browser").page("page").webtable
("table").getroproperty("rows")
cols=Browser("browser").page("page").webtable
("table").getroproperty("cols")
for i=0 to row-1
   for j=0 to col-1
    val=Browser("browser").page("page").webtable   
("table").getcelldata(i,j)
     nsheet.cells(i,j)=val
     next
next
 
Is This Answer Correct ?    0 Yes 0 No
Vikas Sachdeva
 
  Re: How to export(copy) the entire webtable from the webpage into Excelsheet? using Vb scripting
Answer
# 9
Thanks for answering to my question. Thanks a lot
 
Is This Answer Correct ?    0 Yes 0 No
Raj
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
can u give one scenario for for PopWindow Exception & write Code for that? Cap-Gemini1
what does it mean when a check point is in red color? what do u do?  3
how can u put synchronization point in qtp,wat is exactly synchroniztion why we use it wat is benifit in qtp  7
What is the maximum size of Object Repository in QTP 8.2? Mphasis4
How will u declare a variable to access multiple actions? a)Dim b)Global c)Public d)Private  1
Hi, Where should I get all the test's results If I ran the scripts in Batch run. At the result window I found only last test result. Could any one help me on this? Livetek2
Difference between image checkpoint and bitmap checkpoint  2
Hi. plz expalin abouit SetToProperty, SetRoProperty, GetToProperty, GetRoProperty,GetToPrperties. with examples.  3
hai friends i'm learning qtp now where we r using only record &playback frame work.and people r saying in realtime they won't use this frame work. if so what frame work actually using in realtime .and could you give explanation comaparing the record &play back fm and what ever FWyou r using in your organization. hoping cool response. thanx in advance  2
1.how can we report the QTP test result in a different excel sheet 2. Aurigo3
Hi Suppose u have complex Test scripts which u vl write first and which u vl execute first Symphony1
How to parameterize a text field and the same field as combo field on next page. Means inserting values in Text field will appear in the combo field. for example country name, state name. Kindly reply it is urgent !!! Adobe1
How to call the userdefined functions to script? If i am stored 'add()' function in Library functions folder. i want to cal that function in my script.  4
Wt is the difference between Business Component and scripted component? BSL1
What is descriptive programming? Wipro14
what is the use of descripting programming? Ordain-Solutions4
Whether it is possible to test the adobe's controls like zoom, resize, save etc using QTP...If yes, how u can do the same?  1
In QTP how can we recognize objects Without using Object Repository? IBM2
i have to pass the testcases into userid anf password of gmail login page using functions you can take your own testcaseslike userdid should take only lowerletters it should not take special charactors and uppercase letters and password should take only numericvalues it should not take alphanumeric and alphabets  2
I have 2 Environment variable which holds int. I called into my test and addedup. but output is concatenating the values instead of Sum. Ex. Envi("a")= 10, Envi("b") = 20, c= Envi("a")+ Envi("b"). msgbox c ( Ans.1020). How to overcome this pblm? I used the add fn also.. BirlaSoft3
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com