How to retrieve particular cell data in excel sheet ?without importing method.

Answers were Sorted based on User's Feedback



How to retrieve particular cell data in excel sheet ?without importing method...

Answer / uday

The Question is to retrieve a cell value from Excel sheet.

The method which does this is:
XLSheetObj.cells(rowno,colno).value

Is This Answer Correct ?    1 Yes 1 No

How to retrieve particular cell data in excel sheet ?without importing method...

Answer / pravati

set excel=createobject("excel.application")
excel.application.visible=true
excel.workbook.open("path of the excelsheet")
set mysheet=excel.activeworkbook.worksheets("sheet name")
value=mysheet.cells(row no,colmn no).value
msgbox value

Is This Answer Correct ?    0 Yes 0 No

How to retrieve particular cell data in excel sheet ?without importing method...

Answer / ram.polavarapu

'count the number of colums
cc=browser("").page("").webtable("").columcount
'count the number of rows

rc=browser("").page("").webtable("").columcount

for i=1 to rc
for j=1 to cc

'to retrieve all data from excel sheet
n=browser("").page("").webtable("").getcelldata(i,j)
print n

'for example we need to retrieve from 2-row 5-colum
m=browser("").page("").webtable("").getcelldata(2,5)
print m

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More QTP Interview Questions

How to load a object repository(using VBScript) ... very urgent....

4 Answers  


what r the executing modes in QTP

2 Answers  


If the web applicatoin takes navigation time above 2 hours to dispaly next Web page then how can we synchronize the QTP with Appilication Under Test

4 Answers   TCS,


what is delay in QTP?

2 Answers  


what are the functions availabla in QTP? what are the data types in QTP?

2 Answers   Spry Technologies,






how can i replace any text from the qtp script with some anothere text

1 Answers   Livetek,


waht is puirpose of accesbility Check point? waht is the use of Page and XML check points?

1 Answers  


I have the script like this: Browser("Philips Web Login").Page("Philips CL DMS2 Application").Frame("ScopeFrame").Link("DC3701737 (Active)").Click in which the value "DC3701737" will get changed and i have to use the same value in so many places. If i want to get that value "DC3701737" in to a variable, how? pls let me know if you didn't get the question. Help me out in this.

2 Answers  


If there are some browsers opened and I don't how many browsers are open, Now I want to close all the browsers that I don't know how many are opened. What would be Descriptive programming for this in QTP using VB Script..??? Please send your answers.

6 Answers  


If object is not recognized by qtp but the object is standard object what is your approach?

0 Answers  


I have many listboxes in my application. I have to check whether the contents inside the listboxes are in sorted order or not..can anyone please send the code as early as possible

0 Answers  


Step 3&4 are repeated until an the object in recognised uniquely.

0 Answers  


Categories