GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Tech FAQs  >  QTP
Go To First  |  Previous Question  |  Next Question 
 QTP  |  Question 576 of 646    Print  
Fetch values from an excel sheet cell in QTP
What will be the script to access the values of a particular column of an excel sheet (one by one) and use it ? Pls help..Thanks..


  
Total Answers and Comments: 2 Last Update: December 18, 2007     Asked by: cyber_coolie 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
December 17, 2007 07:51:03   #1  
Sycho Member Since: November 2007   Contribution: 66    

RE: Fetch values from an excel sheet cell in QTP
To access value from Local Action Sheet of Run Time Data Table, use the following.

Datatable.GetSheet
("Sheet Name").SetCurrentRow("Mention Row Number from where you want to access the value")

Cell_Value = Datatable.GetSheet("Sheet Name").GetParameter("Mentioned Column Name from where you want to access the Value").Value

Msgbox Cell_Value

To access value from Global Data Sheet of Run Time Data Table, use the
following.


Datatable.GlobalSheet.SetCurrentRow("Mention Row Number from where you want to access the value")

Cell_Value = Datatable.GlobalSheet.GetParameter("Mentioned Column Name from where you want to access the Value").Value

Msgbox Cell_Value


CHEERS

CPS

 
Is this answer useful? Yes | No
December 17, 2007 08:05:40   #2  
Sycho Member Since: November 2007   Contribution: 66    

RE: Fetch values from an excel sheet cell in QTP
From Local Sheet
DataTable.GetSheet("SheetName").SetCurrentRow("Enter Row Number")
abc = DataTable.GetSheet("SheetName").GetParameter("Column Name").Value
MsgBox abc


From Global Sheet
DataTable.GlobalSheet.SetCurrentRow("Enter Row Number")
abc = DataTable.GlobalSheet.GetParameter("Column Name").Value
MsgBox abc

 
Is this answer useful? Yes | No

 Related Questions

I have 10 Edit Boxes in my application. i Named them as Text1, Text2, Text3...Text10. Now i want to set values in these Text Boxes using Loop Statement. Can i Usefor i=0 to 10 browser("b1").page("p1").WebEdit("Text" & i).set "value" &inext**********Is it acceptable WebEdit("Text"&i) ? I am getting error here.Any suggestions?
Read Answers (6) | Asked by : Nagelli Anil Kumar

I need to write the QTP results to a text file or an Excel file as i don't want to see the results in QTP results window.Please Can anybody provide the exact code for itUrgent...............................Thanks in advanceUday
Read Answers (7) | Asked by : Uday

Which command in QTP Script used to capture real time values?If QTP does not support third party web based application which is to be tested for GUI interface,what will be our next approach?What are configuration management Techniques?Difference between sanity testing and smoke testing? when will we use these testing?Comparision between weights and checkpoints.what is batch Testing?What is the difference between object identification and Object Repository?
Read Answers (3) | Asked by : kulgu

Hi I am new to QTP Automation. Can anyone define a process or code to convert Excel data into xml format using QTP....thanks in advanceSatya

I m setting the excel sheet path in QTP for importing as : datatable.importsheet "C:Qtpabc.xls" but if the location of excel sheet path changes to for eg:"D:Data"...the script fails as proper excel sheet path is not given..can u plz suggest how to use a environment variable/xml file to remove data path hard coding??
Read Answers (2) | Asked by : Anita

Hi Freinds,How can i use the array values which are defined in Test.Action1 in another Test.Action2?Is there any function?I can pass the values of variables where as iam not able to pass array which consists of set of values?Please can anyone give the solution fo it .Its very urgent.
Read Answers (2) | Asked by : vasavi

When i run test with login(global action) and book many tickets (local sheet), with every iteration QTP appear an error that is an notice include button "Stop","Skip",....I don't know why?
View Question | Asked by : luckystar

Hi all,Please help me out in this issue. I created an action and imported a sheet to the global datatable.From the first action itself I am calling an external action.In that external action,I tried to import another datatsheet(xl sheet) using the importSheet command to a local datatable space of an action.But QTP stops at this command and says " datatable does not exist" and it shows the previous datasheet that we imported in the first action to the global sheet.How can we use 2 datasheet
Read Answers (3) | Asked by : Ajoy

Hi,I am new to QTP.Can anyone tell me how to solve thisAfter Running the action with 4(for examle) parameters by setting the Run on all rows option in the Action call properties in the action sheet,if i reduce the No of actions to less than 4 say 2 and run the action again,it is still running the script 4 times(keeping the run on all rows option as it is).Actually it should run for 2 times but running for 4 timesRegardsMurali
Read Answers (2) | Asked by : Murali

In a Combobox(or) ListBox there some Values ...like...1,2,3,4. Using QTP how Check these Values are ....Dislying or not...Please Can any one Give the VB Script .....
Read Answers (1) | Asked by : kareem


 Sponsored Links

 
Related Articles

Using XML with Microsoft Excel

Using XML with Microsoft Excel One of the most useful features for a programmer would be Microsoft Excel s capability to support XML schemas which are user defined Though it is not a very prominent feature which can be obviously noted it still exists and is very functional tool In simple English it
 

Assign values during declaration

How to assign values during declaration of variables Declaring variables tells the compiler the data type the variable is assigned and no storage area is allocated during this stage. It is possible to assign values during declaration itself. For example, consider the following program: main() {
 

Passing values to JavaScript Function

Passing values to JavaScript Function In this JavaScript Tutorial you will learn about how to pass values to and also how to return values from a JavaScript function mosgoogle center Passing Values to function Values can be passed to a function as parameters The general syntax for passing values to
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape