• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in QuickTest Professional (QTP) by
Q:

How to create excel file in UFT ?

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

Related questions

+1 vote
asked Apr 16, 2020 in QuickTest Professional (QTP) by Robindeniel
+1 vote
asked Apr 16, 2020 in QuickTest Professional (QTP) by Robindeniel
...