Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to rerieve data from .xls & compare with data in data table
#1
Not Solved
Hi Ankur,
I have a basic knowledge in QTP.Right now we are learning as well as developing scripts for our application.
I want to retrieve data stored in .xls sheet,first row,first colmun & compare this retrieved data with the data outputted in the data table in QTP.we are using QTP9.2.Actually the thing is,in our application,we have an 'About' box which displays the version no. of the build.I want to check whether this version no.is correct & as per latest updations in the .xls sheet from developer.So I have used output value to output this version no. in data table.Now i want to comapre the two values,one in the QTP data table & 2nd in the .xls sheet.I have tried many combinations,but all are failing.Sad
Can you please help me put in this.I am not well versed in descriptive prograaming.You can mail me at mithilasavant@gmail.com
Plz do reply asap.
Thanks..
Reply
#2
Not Solved
Hi,
You can compare it.Suppose you have an excel file called Name.xls whose path is C:\New\Name.xls.Then you can import it by writing:
Code:
Data Table.Import("C:\new\Name.xls")
The file would be imported to your runtime data table formed which you can view in your result summary screen.Now you can use this value also and also yours local data sheet values and can compare them.
Reply
#3
Not Solved
Hi Deepak,
Thanks for your reply.I just had a doubt in your above explaination.
"Now you can use this value also and also yours local data sheet values and can compare them."
->Which is the local data sheet value?how can I get it? Actually I am using 'output value' to get the version no. from application in the run time data table.Now if I retrieve the value from .xls then will it go in the same table? i.e. run time data table? Then how can I get this version no. in local sheet? This value will change evrytime.
Reg. Comaprison: can you tell me any function which will comapre these two values? Can you please send me any script regarding same.

Thanks
Reply
#4
Not Solved
Also when I use the datatable.import command & run it,it always gives me an error 'File contains a feature not supported by formula one'.I am not able to get what the error is specifying.
Reply
#5
Not Solved
Plzzzzz....sum1 help out.... I am not getting the above problem. Sad
Reply
#6
Not Solved
Deepak,
I was able to use the datatable.Import method & retrieve data from xls into runtime table.but how do I get the data into the local data sheet??I mean as you mentioned above? Because the data which I retrieved from xls in run time table is to be matched with the data that I will be outputting from application?
Can you plz explain me how can I do this?

Thanks
Reply
#7
Not Solved
Can anyone tell me how can I compare the local sheet data with the value in run time data sheet?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with Select checkbox from data table value jayraocourts 0 1,226 11-01-2019, 10:25 PM
Last Post: jayraocourts
  Changing Data in the application newbieny 0 958 07-17-2019, 07:19 PM
Last Post: newbieny
  Reading XML Data from a WebPage shaan.mishra87@gmail.com 1 2,180 09-28-2016, 09:16 PM
Last Post: supputuri
  Search and import data from excel under some rules. nwpulele 2 2,876 02-19-2015, 04:10 AM
Last Post: supputuri
Question QTP Script for enter data to DB geethu105 2 3,297 02-24-2014, 06:54 PM
Last Post: guin.anirban

Forum Jump:


Users browsing this thread: 1 Guest(s)