Hey Guys !! I am sharing the ways to handle Microsoft Excel Automation in UFT. usually we use DataTable Method, however it has its own limitations, hence we use Excel Object using VBScript.
Below is the Code for –
How to Create a Blank Excel File and Enter some data then Save it
'Create Excel Object
Set Objexcel= CreateObject("Excel.Application")
'Make it Visible
'Add New Workbook
Set Objworkbook= Objexcel.Workbooks.Add()
'Set the value in First row first column
Objexcel.Cells(1,1).value="Send Me Code"
'Save Work Book
'Close Work Book
'Quit from Excel Application
I will add Next post on Excel Automation Later..
Quicktip: Just Copy this code and save it in a notepad file with file extension as *.*vbs and double click that vbs file and voila !! your excel file will be create with some text in it.
Do share your thoughts !