How to Create excel file in QTP

example -


Below code will create new excel file in QTP.
Set objExcel = CreateObject("Excel.Application")
                                                                                                                                            objExcel.Visible = True
Set Wb = objExcel.Workbooks.Add()
                                                                                                                                                Wb.worksheets(1).Cells(1,1).Value  = "Scenario Id"
                                                                                                                                                Wb.worksheets(1).Cells(1,2).Value  = "Secnario Name"
                                                                                                                                                Wb.worksheets(1).Columns(1).ColumnWidth  = 10
                                                                                                                                                Wb.worksheets(1).Columns(2).ColumnWidth  = 40
                                                                                                                                                Wb.worksheets(1).Columns(3).ColumnWidth  = 20
                                                                                                                                                Wb.worksheets(1).Columns(4).ColumnWidth  = 20

                                                                                                                                                                                                Wb.SaveAs "c:\ayx.xlsx"  ' save file in say "c:\ayx.xlsx"
                                                                                                                                                                                                Wb.close
                                                                                                                                                                                                objExcel.Quit
                                                                                                                                                                                                blnFlag = False