QTP Script to create Excel Sheet and to enter data into it(using script).
To create Excel Sheet
Set Excel=createObject("Excel.Application")
Set ExcelSheet=createObject("Excel.sheet")
ExcelSheet.Application.visible=true
'script to enter data(into excel sheet)
Excel.ActiveSheet.cells(1,1).value=1111
Excel.ActiveSheet.cells(1,2).value=2222
Excel.ActiveSheet.cells(2,1).value=3333
Excel.ActiveSheet.cells(2,2).value=4444
ExcelSheet.SaveAs "C:/XYZ.xls"
Excel Sheet is saved in C folder with following data.
A B
1111 2222
3333 4444
Data Driven Testing using Excel Sheet
QTP Script to create Excel Sheet and to enter data into it
Subscribe to:
Post Comments (Atom)
3 comments:
really helpful
thanks a lot for ur help
really it was very helpful. thanks
Post a Comment