Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Save an Active Excel WorkBook using VbScript in QTP
#1
Not Solved
Hi Ankur,

In my application I need to save an excel report from a web page.When click on the excel file link , a Pop up window with Open, Savexcel file and Cancel will appear.
Here I have two options to save the file to the local directory

1) Using the Save and give the path, but when give the path through the VBscript and click on the Save button, its not getting saved, The file name passed through VBscript to the filename textbox is not accepting
2) in the second option, after opening I have the below VbScript to save the file , But its not working during run mode,an Error is showing "Object required". Its working when I am Debugging the same step in QTp.

Code:
oExcelApp = GetObject(,"excel.application")
    wait(25)
oExcelApp.ActiveWorkBook.SaveAs "C:\xExel.xls"
oExcelApp.Application.Quit

Please help me to get a solution for this issue
Reply


Messages In This Thread
How to Save an Active Excel WorkBook using VbScript in QTP - by shilupg - 06-04-2014, 05:01 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP 11: Does not recognise "File > Save As" action on PDF manes 1 2,299 12-03-2013, 06:06 PM
Last Post: Sourabh146
  QTP script to save the generated .csv file and excel file priya elangovan 0 4,162 08-29-2012, 04:17 PM
Last Post: priya elangovan
  QTP 10.0 with .Net addin will freeze the application if you want to save a file Janet 0 2,943 09-07-2011, 07:40 PM
Last Post: Janet
  Active Screen images not displaying Herkimer 0 3,302 05-04-2011, 10:53 PM
Last Post: Herkimer
  Active screen page cant be displayed. yvslraoalerts@gmail.com 1 2,766 03-23-2011, 02:15 PM
Last Post: sumanpasupula

Forum Jump:


Users browsing this thread: 1 Guest(s)