Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to read and write in excel through QTP script
#5
Solved: 10 Years, 9 Months, 2 Weeks ago
[quote='shwetha_m' pid='19969' dateline='1328977787']
Hi I am new to this tool, Can any one pls send me step by step procedure on how to read and write the data in excel?

Regards,
Shwetha

Hi Shweta,

PFB:
Code:
dim ExcelObj ,NewSheet
Set ExcelObj = CreateObject("Excel.Application")
ExcelObj.Workbooks.Add
Set NewSheet = ExcelObj.Sheets.Item(1)
NewSheet.Name = "name of excel file"
NewSheet.Cells(2,2) = variable or string
ExcelObj.ActiveWorkbook.SaveAs "D:\name of excel file"
ExcelObj.Quit
Reply


Messages In This Thread
RE: How to read and write in excel through QTP script - by kishorambare - 11-06-2012, 06:05 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Want to read the data from excel and set read value in the JavaTable rajeevk7 0 2,174 07-10-2017, 04:20 PM
Last Post: rajeevk7
  VB Script to separate upper & small Letters from a string and store in excel pradeep537 1 2,088 08-05-2016, 12:26 AM
Last Post: Ankur
  UFT taking different script execution timings while comparing 2 excel files. sudheer 0 2,224 06-26-2015, 03:28 PM
Last Post: sudheer
  How to write a script for fly out menus (Parent - Child - Sub Child) rajkumarsm 3 4,464 09-02-2014, 10:01 AM
Last Post: vinod123
  How to mask the particular read only mode fields while capturing screenshot in QTP kalaivanan123 2 3,372 03-18-2014, 11:31 AM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)