in QuickTest Professional (QTP) by
Q:

How to create excel file in UFT ?

► Click here to show 1 Answer

0 votes
by

steps will create excel file in UFT,

'Create a new Microsoft Excel object

Set myExcel = createobject("excel.application")

'To make Excel visible

myExcel.Application.Visible = true

myExcel.Workbooks.Add

MyExcel.worksheets(1).Cells(1,1). Value = “Scenario Id”

MyExcel.worksheets(1).Cells(1,2).Value = “Scenario Name”

MyExcel.worksheets(1).Columns(1).ColumnWidth = 10

MyExcel.worksheets(1).Columns(2).ColumnWidth = 40

MyExcel.worksheets(1).Columns(3).ColumnWidth = 20

MyExcel.worksheets(1).Columns(4).ColumnWidth = 20

MyExcel.SaveAs "c:\madanswer.xlsx"

MyExcel.close

objExcel.Quit

blnFlag = False

Learn More with Madanswer

Related questions

0 votes
asked Apr 25, 2020 in QuickTest Professional (QTP) by Robindeniel
...