45,000 Jobs - Get an Interview Call,  Post Your Resume Here
SURESHKUMAR.NET FORUMS
Registered Member Login:
Not a member? Register today!



Welcome to the SURESHKUMAR.NET FORUMS.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.




QTP Excel File Scripts

        

Reply
 
LinkBack Thread Tools Display Modes
Old 29-09-08, 06:34 AM   #1 (permalink)
Junior Member
 
Join Date: Sep 2008
Age: 27
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 2 Bharat_aus is on a distinguished road
QTP Excel File Scripts

Hi All,

Can Any one post sample code to read and write test data to external excel file using QTP

Bharat_aus is offline Offline   Reply With Quote
Old 30-09-08, 10:20 PM   #2 (permalink)
Member
 
Join Date: Feb 2008
Age: 46
Posts: 92
Thanks: 17
Thanked 3 Times in 3 Posts
Rep Power: 2 butair is on a distinguished road
Re: QTP Excel File Scripts

Try posting your querry to: QTP Beginners

I believe you'll get your answer there.
butair is offline Offline   Reply With Quote
The Following User Says Thank You to butair For This Useful Post:
AjayKumar.Kataram (15-02-09)
Old 03-10-08, 01:06 PM   #3 (permalink)
Junior Member
 
Join Date: Jun 2008
Age: 24
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 2 saran_s85 is on a distinguished road
Re: QTP Excel File Scripts

Hi,

Set oexcel = CreateObject("Excel.Application")
Set obook = oexcel.Workbooks.Open("D:\sample.xls")

' Writing values into excel sheet

oexcel.Cells(1,2) = "QTP"
oexcel.Cells(1,3) = "Automation"

'Reading values from excel sheet

strvar1 = oexcel.Cells(1,2)
strvar2 = oexcel.Cells(1,3)

obook.Save
obook.Close


I hope this code will help you
saran_s85 is offline Offline   Reply With Quote
Old 11-12-08, 02:38 AM   #4 (permalink)
Junior Member
 
Join Date: Dec 2008
Age: 28
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1 Simran06 is on a distinguished road
Re: QTP Excel File Scripts

I want to copy some rows in an excel sheet to another excel sheet like A1.xls to A2.xls and rows which i want to copy are like “B8:Z8″, "B15:Z:15" and "B22:Z22" and so on. In the following code below:

objworksheet.Range ("B8:Z8")

I would like to enter dynamic values in “Range” field like first time the script will copy the Range “B8:Z8″ and second time “B15:Z15″ and so on. So I would like to make the script dynamic. Is there any way can I do it or using loops etc.? please help me out.

Thanks.
Simran06 is offline Offline   Reply With Quote
Reply

Tags
excel , file , qtp , scripts


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MANUAL TESTING CONCEPTS (pdf) ramkumarbtech Testing Tools & QA 17 16-11-09 01:08 PM
Mega Free Download S/W Links A-Z yathish OTHERS 516 21-03-09 10:06 AM
HACK WITH MS DOS __wicked__ SYSTEM SECURITY & ETHICAL HACKING 1 14-12-08 10:21 PM
interview Q&A asked in winrunner Spoorthi Testing Tools & QA 80 22-11-08 11:48 PM
C Contest-28 keerthi DATA STRUCTURES, C, C++, VC ++ 6 01-07-06 10:04 PM


All times are GMT +6.5. The time now is 09:16 AM.

More Interview Questions Here...

Content Relevant URLs by vBSEO 3.3.0