''We can do excel operations using excel object model. To find excel object model in your system follow these steps..
'*********** ********* ********* ********* *
'creating an excel application object
Set Excel=CreateObject( "Excel.Application")
'Adding a sheet in that application
Set ExcelSheet = CreateObject( "Excel.Sheet" )
' Make Excel visible through the Application object.
ExcelSheet.Application.Visible = True
'Adding value into sheet
For i=1 to 10
ExcelSheet.ActiveSheet.Cells( i,1).Value = "This is column A, row"&i
Next
' Save the sheet.
ExcelSheet.SaveAs "C:\TEST.xls"
' Close Excel with the Quit method on the Application object.
ExcelSheet.Applicat ion.Quit
' Release the object variable.
Set ExcelSheet = Nothing
'*********** ********* ********* ********* *
''Copy this script in .vbs file and double click on it or paste this script in QTP and execute it.
''After that go C:\ drive you will find an excel application in the name of TEST.xls..
''Try to understand this by referring excel object model.. Revert me for any concerns..
wbook.Save ("E:\123.xls")
ReplyDeletein qtp excel object.
Excel is prompting file exists
How do I save....
I am a beginner..pls help
'To Disable Overwrite Confirmation
ReplyDeletewbook.DisplayAlerts = False