• +91 9723535972
  • info@interviewmaterial.com

QTP Interview Questions and Answers

Question - How to create excel file in UFT ?

Answer -

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:\Filename.xlsx"
MyExcel.close
objExcel.Quit
blnFlag = False

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners