How do you copy a value from a cell in an msexcel sheet saved
on the desktop into QTP's datatable when the co-ordinates of
cell are given?

Answers were Sorted based on User's Feedback



How do you copy a value from a cell in an msexcel sheet saved on the desktop into QTP's datat..

Answer / aruna

V CAN COPY THE CELL VALUES
GIVE THE CELL VALUE EX (1,1).COPY .............

Is This Answer Correct ?    4 Yes 1 No

How do you copy a value from a cell in an msexcel sheet saved on the desktop into QTP's datat..

Answer / pankaj

Call the excel first :
Set xl = createobject("excel.application")
Set wb = xl.Workbooks.Open("D:\test.xls")
Set ws=wb.Worksheets(sheet1)
datatable("Colname","Sheetname")=ws.cells(i,j) ' i and j
'would be known row and col into excel

Try this it will work for more doubt in QTP you can directly
post me question on my blog
http://quality2deliver.blogspot.com

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More QTP Interview Questions

Hi I am new to QTP. we are planning to implement automation for the application. I am trying to execute the following script: Set ExcelObj=CreateObject ("Excel.Application") ExcelObj.WorkBooks.Add Set NewSheet=ExcelObj.Sheets.Item(1) NewSheet.Name="Order" ExcelObj.Cells(1, 1).Value = "Name" ExcelObj.Cells(1, 2).Value = "Ordernum" ExcelObj.Cells(2, 1).Value = "nam" ExcelObj.Cells(2, 2).Value = "21" ExcelObj.ActiveWorkbook.SaveAs "c:\test1.xls" ExcelObj.Quit Set ExcelObj = Nothing in the above script for the line(ExcelObj.Cells(2, 2).Value = "21") it is inserting the value 21 successfully.this is fine But if i want to insert a variable instead of the constant value then what should be the modification in the script. For example: If user retrives a value throug "GetRoProperty" and wants to insert the value into then how the script changes?

1 Answers  


Hi, How Accessibility checkpoint in QTP can be implemented in the test script?

0 Answers  


What is Data driven Testing Frame work.Anybody can expain it in Detail.. Pls anybody can give the answer.. Thanks in advance...

1 Answers   Navis,


HOW TO CONVERT MANUAL TEST CASES IN TO AUTOMATION TEST SCRIPTS EXPLAIN THE PROCESS?

0 Answers   ADP,


Suppose I created one object as virtual object? That object is applicable to that test? Or all the tests?

0 Answers  






What is QuickTest Automation Object Model? Where we can use AOM?

1 Answers  


How to analyzing test results using quicktest professional?

0 Answers  


If the weblist is identified as webelement,and by clicking on webelement if the values are displayed,and if the values the values also identified as webelement.then how to fetch the values through script?

0 Answers  


On what document base Descriptive programming is written if build is not yet ready ?

0 Answers  


How to make arguments optional in a function?

0 Answers   Crea,


QTP identified the object but not performing the desired action???what could be the reason?????

1 Answers   Mphasis,


By using QTP, How do you test a frame in a web page?

4 Answers   TCS,


Categories