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

Hi, i have a string like "INDIA". I need to display this string vertically in Msgbox?

1 Answers  


In a webtable,a list of values are there,rightnow one values shows,later random another values shows,but how to retrieve the random value in webtable.

1 Answers   HP,


While writing script using For Next Statement in QTP, I try defining the variable in Lib File I am getting syntax error whereas if I use the variable in script file, the script works fine. Can anyone help me in finding the reason behind this?. E:g Dim intStartRow (Define in Lib File----- say abc.vbs) Dim intRow (If I define this variable in Lib file I am getting Syntax error where as if I define in the script file ---- say xyz.mts the script works fine) IntStartRow=2 For intRow = intStartRow to xlWrksht.UsedRange.Rows.Count ‘Some Code here Next

1 Answers  


In QTP if u got a defect , how to report to developer using Test director or Quality center .

5 Answers   Wipro,


How can you identify the browser and its information using the qtp script?

0 Answers  






How can I find out whether a word in a string is existed or not for example "QTP IS A POWERFULL TOOL FOR AUTOMATION" How can i find out whether "powerfull" is existed in the above string or not Could anyone answer it?

7 Answers   Livetek,


Hi..friends can anybody write the script for this question... Am having some 20 nos of links in a web application, i want to click some 5,13 & 17th links. So please....can anybody give the answer....??? -->Hani<--

4 Answers  


What is the synchronization point in qtp?

0 Answers  


We have 10 rows of records in data table, but we have to run 4th, 5th and 6th rows only. How can we handle this scenario in QTP?

5 Answers   Accenture, Banca Sella, Polaris,


Can anyone help.i need total excelsheet operations,shortcuts in testing environment from starting onwards....

0 Answers  


How to identify the objects using descriptive programming when the object property values are same, i mean in a page 10 objects are there i want to click the 6th object but all the object property values are same? using descriptive programming

2 Answers   Genpact,


In Remote acess server how u run a test?

0 Answers  


Categories