Categories

Apr 16 in QuickTest Professional (QTP)
Q:

How to create excel file in UFT ?

1 Answer

Apr 16

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

Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

Madanswer
Apr 25 in QuickTest Professional (QTP)
Apr 16 in QuickTest Professional (QTP)
Jun 22, 2019 in PHP
...