11-26-2013, 03:45 PM
You can write those values directly in Excel and Save it where you want by using QTP.
Code:
Set ObjExcel = CreateObject("Excel.Application")
ObjExcel.Visible = TRUE
Set sWorkbook = ObjExcel.Workbooks.Add
Set sWorksheet = sWorkbook.Worksheets("sheet1")
sWorkbook.Worksheets("sheet1").Cells(1,1).Value = "User Name"
sWorkbook.Worksheets("sheet1").Cells(1,2).Value = "Password"
sWorkbook.SaveAs "C:/Book.xls"
Set sWorksheet = Nothing
set sWorkbook = Nothing
set ObjExcel = Nothing