Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excel and Driver Script
#1
Not Solved
Hi,

I have driver script that opens two qtp files: Test1 and Test2.

1. Test1:
Code:
Set ExcelApp = CreateObject("Excel.Application")
ExcelApp.Visible = True

Dim FilePath
FilePath = "W:\T.xlsx"

Set ExcFile = ExcelApp.Workbooks.Open (FilePath)
Set SheetOne = ExcFile.Worksheets("QTP")

ExcelApp.Cells(12, 8).Value = "first"

2. Test2:
Code:
ExcelApp.Cells(13, 8).Value = "second"

When I run the driver script, it opens Test1 and enter "first" in cell(12,8) during Test1 run but it does not enter "second" in cell(13,8) during Test2 run.

Both tests must enter data into the "QTP" sheet of the same excel file.

Please help.

-S
Reply
#2
Not Solved
Did you closed the work book in your script? (Test1)- we have to close the any work books at the end of the script without fail otherwise you can access them in next script....
Use the UsedRange and get the row where you have enter the data rather hard coding the row numbers.
Thanks,
SUpputuri
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Open QTP using Driver Script shipu 1 3,076 02-26-2014, 12:21 PM
Last Post: supputuri
  Update a value in excel sheet during runtime & use the value later in the same script SweetyChowdhury 3 5,443 09-08-2011, 03:33 PM
Last Post: souvikghosh_diatm
  How to export the QTP results to excel using script? madhankumar 0 3,799 01-14-2011, 07:13 PM
Last Post: madhankumar
  Export data from Excel to access using VB script skancha 1 3,972 10-12-2009, 08:13 PM
Last Post: jsknight1969
  Import Excel data to access using VB Script skancha 3 9,382 10-09-2009, 06:54 PM
Last Post: Saket

Forum Jump:


Users browsing this thread: 1 Guest(s)